FreeBSD Bugzilla – Attachment 202015 Details for
Bug 235737
sysutils/google-compute-engine-oslogin: update to 1.4.3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to update to version 1.4.3
google-compute-engine-oslogin_update-to-version-1.4.3.patch (text/plain), 13.95 KB, created by
Lucas Kanashiro
on 2019-02-14 13:20:07 UTC
(
hide
)
Description:
Patch to update to version 1.4.3
Filename:
MIME Type:
Creator:
Lucas Kanashiro
Created:
2019-02-14 13:20:07 UTC
Size:
13.95 KB
patch
obsolete
>diff -Nru google-compute-engine-oslogin.old/Makefile google-compute-engine-oslogin/Makefile >--- google-compute-engine-oslogin.old/Makefile 2019-02-14 13:23:45.958006000 +0000 >+++ google-compute-engine-oslogin/Makefile 2019-02-14 12:39:06.220715000 +0000 >@@ -1,8 +1,7 @@ >-# $FreeBSD: head/sysutils/google-compute-engine-oslogin/Makefile 487272 2018-12-12 01:35:33Z gerald $ >+# $FreeBSD: head/sysutils/google-compute-engine-oslogin/Makefile 479045 2018-09-05 22:01:55Z sunpoet $ > > PORTNAME= google-compute-engine-oslogin >-DISTVERSION= 1.3.1 >-PORTREVISION= 1 >+DISTVERSION= 1.4.3 > CATEGORIES= sysutils > > MAINTAINER= helen.koike@collabora.com >@@ -21,8 +20,7 @@ > USE_GITHUB= yes > GH_ACCOUNT= GoogleCloudPlatform > GH_PROJECT= compute-image-packages >-GH_TAGNAME= 20181011 >- >+GH_TAGNAME= 20190124 > MAKE_ARGS= JSON_INCLUDE_PATH=${LOCALBASE}/include/json-c \ > BIN_INSTALL_PATH=/bin \ > PAM_INSTALL_PATH=/lib \ >diff -Nru google-compute-engine-oslogin.old/distinfo google-compute-engine-oslogin/distinfo >--- google-compute-engine-oslogin.old/distinfo 2019-02-14 13:23:45.958076000 +0000 >+++ google-compute-engine-oslogin/distinfo 2019-02-20 11:40:04.636982000 +0000 >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1539895280 >-SHA256 (GoogleCloudPlatform-compute-image-packages-1.3.1-20181011_GH0.tar.gz) = c9fb44fb8c4bbde108a2aeba44f11938c7840256ca078804ec3c720a47e79144 >-SIZE (GoogleCloudPlatform-compute-image-packages-1.3.1-20181011_GH0.tar.gz) = 147405 >+TIMESTAMP = 1550662804 >+SHA256 (GoogleCloudPlatform-compute-image-packages-1.4.3-20190124_GH0.tar.gz) = 09637f951245729c66eb5b7b9ed49bead31349b29829baf5c8a4e5d45405a2f4 >+SIZE (GoogleCloudPlatform-compute-image-packages-1.4.3-20190124_GH0.tar.gz) = 126211 >diff -Nru google-compute-engine-oslogin.old/files/patch-bin_google__oslogin__control google-compute-engine-oslogin/files/patch-bin_google__oslogin__control >--- google-compute-engine-oslogin.old/files/patch-bin_google__oslogin__control 2019-02-14 13:23:45.958275000 +0000 >+++ google-compute-engine-oslogin/files/patch-bin_google__oslogin__control 1970-01-01 00:00:00.000000000 +0000 >@@ -1,76 +0,0 @@ >---- bin/google_oslogin_control.orig 2018-10-11 16:53:23 UTC >-+++ bin/google_oslogin_control >-@@ -20,7 +20,7 @@ sshd_config="/etc/ssh/sshd_config" >- el_release_file="/etc/redhat-release" >- sudoers_dir="/var/google-sudoers.d" >- users_dir="/var/google-users.d" >--sudoers_file="/etc/sudoers.d/google-oslogin" >-+sudoers_file="%%PREFIX%%/etc/sudoers.d/google-oslogin" >- >- usage() { >- echo "Usage: ${script_name} {activate|deactivate|status} [--norestartsshd]" >-@@ -31,7 +31,7 @@ usage() { >- } >- >- added_comment="# Added by Google Compute Engine OS Login." >--sshd_command="AuthorizedKeysCommand /usr/bin/google_authorized_keys" >-+sshd_command="AuthorizedKeysCommand %%PREFIX%%/bin/google_authorized_keys" >- sshd_user="AuthorizedKeysCommandUser root" >- pam_login="account requisite pam_oslogin_login.so" >- pam_admin="account optional pam_oslogin_admin.so" >-@@ -65,24 +65,26 @@ overwrite_file() { >- >- remove_from_config() { >- config=$1 >-- sed -i "/${added_comment}/,+1d" ${config}.new >-+ gsed -i "/${added_comment}/,+1d" ${config}.new >- } >- >- remove_from_nss_config() { >-- sed -i '/^passwd:/ s/ cache_oslogin oslogin//' ${nss_config}.new >-- sed -i '/^passwd:/ s/ cache oslogin//' ${nss_config}.new >-- sed -i '/^passwd:/ s/ oslogin//' ${nss_config}.new >-+ gsed -i '/^passwd:/ s/ cache_oslogin oslogin//' ${nss_config}.new >-+ gsed -i '/^passwd:/ s/ cache oslogin//' ${nss_config}.new >-+ gsed -i '/^passwd:/ s/ oslogin//' ${nss_config}.new >- } >- >- add_to_sshd_config() { >- remove_from_config ${sshd_config} >-- sed -i "\$a${added_comment}\n${sshd_command}" ${sshd_config}.new >-- sed -i "\$a${added_comment}\n${sshd_user}" ${sshd_config}.new >-+ gsed -i "\$a${added_comment}\n${sshd_command}" ${sshd_config}.new >-+ gsed -i "\$a${added_comment}\n${sshd_user}" ${sshd_config}.new >- } >- >- add_to_nss_config() { >- remove_from_nss_config >-- sed -i '/^passwd:/ s/$/ cache_oslogin oslogin/' ${nss_config}.new >-+ gsed -i '/^passwd:/ s/$/ cache_oslogin oslogin/' ${nss_config}.new >-+ # Replace compat by files (as compat cannot be used with other sources) >-+ gsed -i '/^passwd:/ s/compat/files/' ${nss_config}.new >- } >- >- add_to_pam_config() { >-@@ -99,9 +101,9 @@ ${pam_homedir} >- " >- echo "${added_config}$(cat ${pam_config}.new)" > ${pam_config}.new >- else >-- sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new >-- sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new >-- sed -i "/pam_loginuid.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new >-+ gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new >-+ gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new >-+ gsed -i "/session.*pam_permit.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new >- fi >- } >- >-@@ -115,7 +117,7 @@ restart_service() { >- fi >- fi >- if which service > /dev/null 2>&1; then >-- if service --status-all | grep -Fq ${service}; then >-+ if service -e | grep -Fq ${service}; then >- echo "Restarting ${service}." >- service ${service} restart >- return $? >diff -Nru google-compute-engine-oslogin.old/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c >--- google-compute-engine-oslogin.old/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c 2019-02-14 13:23:45.958352000 +0000 >+++ google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c 2019-02-20 12:37:58.515823000 +0000 >@@ -1,4 +1,4 @@ >---- libnss_cache_oslogin/nss_cache_oslogin.c.orig 2018-10-11 16:53:23 UTC >+--- libnss_cache_oslogin/nss_cache_oslogin.c.orig 2019-01-24 19:28:43 UTC > +++ libnss_cache_oslogin/nss_cache_oslogin.c > @@ -16,6 +16,7 @@ > >@@ -13,7 +13,7 @@ > static FILE *p_file = NULL; > static char p_filename[NSS_CACHE_OSLOGIN_PATH_LENGTH] = > - "/etc/oslogin_passwd.cache"; >-+ "%%PREFIX%%/etc/oslogin_passwd.cache"; >++ "/usr/local/etc/oslogin_passwd.cache"; > #ifdef BSD > extern int fgetpwent_r(FILE *, struct passwd *, char *, size_t, > struct passwd **); >diff -Nru google-compute-engine-oslogin.old/files/patch-nss__cache_nss__cache.cc google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc >--- google-compute-engine-oslogin.old/files/patch-nss__cache_nss__cache.cc 2019-02-14 13:23:45.958425000 +0000 >+++ google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc 2019-02-20 11:35:29.125045000 +0000 >@@ -6,8 +6,8 @@ > // File paths for the nss cache file. > -static const char kDefaultFilePath[] = "/etc/oslogin_passwd.cache"; > -static const char kDefaultBackupFilePath[] = "/etc/oslogin_passwd.cache.bak"; >-+static const char kDefaultFilePath[] = "%%PREFIX%%/etc/oslogin_passwd.cache"; >-+static const char kDefaultBackupFilePath[] = "%%PREFIX%%/etc/oslogin_passwd.cache.bak"; >++static const char kDefaultFilePath[] = "/usr/local/etc/oslogin_passwd.cache"; >++static const char kDefaultBackupFilePath[] = "/usr/local/etc/oslogin_passwd.cache.bak"; > > // Local NSS Cache size. This affects the maximum number of passwd entries per > // http request. >diff -Nru google-compute-engine-oslogin.old/files/patch-nss__module_nss__oslogin.cc google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc >--- google-compute-engine-oslogin.old/files/patch-nss__module_nss__oslogin.cc 2019-02-14 13:23:45.958517000 +0000 >+++ google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc 2019-02-20 12:37:58.528552000 +0000 >@@ -1,4 +1,4 @@ >---- nss_module/nss_oslogin.cc.orig 2018-10-11 16:53:23 UTC >+--- nss_module/nss_oslogin.cc.orig 2019-01-24 19:28:43 UTC > +++ nss_module/nss_oslogin.cc > @@ -16,6 +16,7 @@ > #include <errno.h> >diff -Nru google-compute-engine-oslogin.old/files/patch-pam__module_pam__oslogin__admin.cc google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc >--- google-compute-engine-oslogin.old/files/patch-pam__module_pam__oslogin__admin.cc 2019-02-14 13:23:45.958580000 +0000 >+++ google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc 2019-02-20 12:37:58.534993000 +0000 >@@ -1,4 +1,4 @@ >---- pam_module/pam_oslogin_admin.cc.orig 2018-10-11 16:53:23 UTC >+--- pam_module/pam_oslogin_admin.cc.orig 2019-01-24 19:28:43 UTC > +++ pam_module/pam_oslogin_admin.cc > @@ -14,7 +14,6 @@ > >@@ -8,7 +8,7 @@ > #include <security/pam_modules.h> > #include <sys/stat.h> > #include <sys/types.h> >-@@ -48,7 +47,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in >+@@ -50,7 +49,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in > int pam_result = PAM_SUCCESS; > const char *user_name; > if ((pam_result = pam_get_user(pamh, &user_name, NULL)) != PAM_SUCCESS) { >@@ -16,10 +16,10 @@ > + syslog(LOG_INFO, "Could not get pam user."); > return pam_result; > } >- string str_user_name(user_name); >-@@ -82,7 +81,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in >+ >+@@ -81,7 +80,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in > if (HttpGet(url.str(), &response, &http_code) && http_code == 200 && >- ParseJsonToAuthorizeResponse(response)) { >+ ParseJsonToSuccess(response)) { > if (!file_exists) { > - pam_syslog(pamh, LOG_INFO, > + syslog(LOG_INFO, >diff -Nru google-compute-engine-oslogin.old/files/patch-pam__module_pam__oslogin__login.cc google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc >--- google-compute-engine-oslogin.old/files/patch-pam__module_pam__oslogin__login.cc 2019-02-14 13:23:45.958642000 +0000 >+++ google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc 2019-02-20 12:37:58.539114000 +0000 >@@ -1,4 +1,4 @@ >---- pam_module/pam_oslogin_login.cc.orig 2018-10-11 16:53:23 UTC >+--- pam_module/pam_oslogin_login.cc.orig 2019-02-20 12:34:55 UTC > +++ pam_module/pam_oslogin_login.cc > @@ -14,7 +14,6 @@ > >@@ -8,7 +8,7 @@ > #include <security/pam_modules.h> > #include <sys/stat.h> > #include <sys/types.h> >-@@ -46,7 +45,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in >+@@ -53,7 +52,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in > int pam_result = PAM_PERM_DENIED; > const char *user_name; > if ((pam_result = pam_get_user(pamh, &user_name, NULL)) != PAM_SUCCESS) { >@@ -17,7 +17,7 @@ > return pam_result; > } > string str_user_name(user_name); >-@@ -93,7 +92,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in >+@@ -100,7 +99,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in > chown(users_filename.c_str(), 0, 0); > chmod(users_filename.c_str(), S_IRUSR | S_IWUSR | S_IRGRP); > } >@@ -26,12 +26,64 @@ > "Granting login permission for organization user %s.", > user_name); > pam_result = PAM_SUCCESS; >-@@ -101,7 +100,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in >+@@ -108,7 +107,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in > if (file_exists) { > remove(users_filename.c_str()); > } > - pam_syslog(pamh, LOG_INFO, > + syslog(LOG_INFO, >- "Denying login permission for organization user %s.", user_name); >+ "Denying login permission for organization user %s.", >+ user_name); > >- pam_result = PAM_PERM_DENIED; >+@@ -128,7 +127,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh >+ { >+ const char* user_name; >+ if (pam_get_user(pamh, &user_name, NULL) != PAM_SUCCESS) { >+- pam_syslog(pamh, LOG_INFO, "Could not get pam user."); >++ syslog(LOG_INFO, "Could not get pam user."); >+ return PAM_PERM_DENIED; >+ } >+ >+@@ -155,7 +154,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh >+ >+ response = ""; >+ if (!StartSession(email, &response)) { >+- pam_syslog(pamh, LOG_ERR, >++ syslog(LOG_ERR, >+ "Bad response from the two-factor start session request: %s", >+ response.empty() ? "empty response" : response.c_str()); >+ return PAM_PERM_DENIED; >+@@ -163,7 +162,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh >+ >+ string status; >+ if (!ParseJsonToKey(response, "status", &status)) { >+- pam_syslog(pamh, LOG_ERR, >++ syslog(LOG_ERR, >+ "Failed to parse status from start session response"); >+ return PAM_PERM_DENIED; >+ } >+@@ -179,7 +178,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh >+ >+ std::vector<oslogin_utils::Challenge> challenges; >+ if (!ParseJsonToChallenges(response, &challenges)) { >+- pam_syslog(pamh, LOG_ERR, >++ syslog(LOG_ERR, >+ "Failed to parse challenge values from JSON response"); >+ return PAM_PERM_DENIED; >+ } >+@@ -242,13 +241,13 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh >+ pam_error(pamh, "Unable to get user input"); >+ } >+ } else { >+- pam_syslog(pamh, LOG_ERR, "Unsupported challenge type %s", >++ syslog(LOG_ERR, "Unsupported challenge type %s", >+ challenge.type.c_str()); >+ return PAM_PERM_DENIED; >+ } >+ >+ if (!ContinueSession(email, user_token, session_id, challenge, &response)) { >+- pam_syslog(pamh, LOG_ERR, >++ syslog(LOG_ERR, >+ "Bad response from two-factor continue session request: %s", >+ response.empty() ? "empty response" : response.c_str()); >+ return PAM_PERM_DENIED; >diff -Nru google-compute-engine-oslogin.old/files/patch-utils_oslogin__utils.cc google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc >--- google-compute-engine-oslogin.old/files/patch-utils_oslogin__utils.cc 2019-02-14 13:23:45.958704000 +0000 >+++ google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc 2019-02-13 20:06:10.577673000 +0000 >@@ -1,4 +1,4 @@ >---- utils/oslogin_utils.cc.orig 2018-11-13 21:29:55 UTC >+--- utils/oslogin_utils.cc.orig 2019-01-24 19:28:43 UTC > +++ utils/oslogin_utils.cc > @@ -23,8 +23,7 @@ > #include <iostream> >@@ -18,7 +18,7 @@ > > #include "oslogin_utils.h" > >-@@ -279,7 +277,7 @@ bool ValidatePasswd(struct passwd* result, BufferManag >+@@ -292,7 +290,7 @@ bool ValidatePasswd(struct passwd* result, BufferManag > } > } > if (strlen(result->pw_shell) == 0) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 235737
: 202015 |
202016
|
202017