From owner-svn-ports-head@freebsd.org Fri Nov 23 19:43:47 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 204DC114FD1B; Fri, 23 Nov 2018 19:43:47 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAE6072115; Fri, 23 Nov 2018 19:43:46 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CBF62326A; Fri, 23 Nov 2018 19:43:46 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wANJhk9i028358; Fri, 23 Nov 2018 19:43:46 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wANJhieG028346; Fri, 23 Nov 2018 19:43:44 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201811231943.wANJhieG028346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Fri, 23 Nov 2018 19:43:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r485700 - in head/sysutils/google-compute-engine-oslogin: . files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/sysutils/google-compute-engine-oslogin: . files X-SVN-Commit-Revision: 485700 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BAE6072115 X-Spamd-Result: default: False [1.55 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.37)[0.368,0]; NEURAL_SPAM_MEDIUM(0.75)[0.746,0]; NEURAL_SPAM_LONG(0.44)[0.439,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 19:43:47 -0000 Author: swills Date: Fri Nov 23 19:43:44 2018 New Revision: 485700 URL: https://svnweb.freebsd.org/changeset/ports/485700 Log: sysutils/google-compute-engine-oslogin: update to 1.3.1 PR: 232440 Submitted by: Lucas Kanashiro Approved by: Helen Koike (maintainer, earlier version of patch) Deleted: head/sysutils/google-compute-engine-oslogin/files/patch-Makefile Modified: head/sysutils/google-compute-engine-oslogin/Makefile (contents, props changed) head/sysutils/google-compute-engine-oslogin/distinfo (contents, props changed) head/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control (contents, props changed) head/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c (contents, props changed) head/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc (contents, props changed) head/sysutils/google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc (contents, props changed) head/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc (contents, props changed) head/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc (contents, props changed) head/sysutils/google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc (contents, props changed) Modified: head/sysutils/google-compute-engine-oslogin/Makefile ============================================================================== --- head/sysutils/google-compute-engine-oslogin/Makefile Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/Makefile Fri Nov 23 19:43:44 2018 (r485700) @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= google-compute-engine-oslogin -DISTVERSION= 1.3.0 -PORTREVISION= 3 +DISTVERSION= 1.3.1 CATEGORIES= sysutils MAINTAINER= helen.koike@collabora.com @@ -21,7 +20,8 @@ USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= GoogleCloudPlatform GH_PROJECT= compute-image-packages -GH_TAGNAME= 20180611 +GH_TAGNAME= 20181011 + MAKE_ARGS= JSON_INCLUDE_PATH=${LOCALBASE}/include/json-c \ BIN_INSTALL_PATH=/bin \ PAM_INSTALL_PATH=/lib \ @@ -33,8 +33,10 @@ WRKSRC_SUBDIR= google_compute_engine_oslogin PLIST_SUB= DISTVERSION=${DISTVERSION} post-patch: - @${REINPLACE_CMD} -e 's|/etc/sudoers.d|${PREFIX}/etc/sudoers.d|g ; \ - s|/usr/bin|${PREFIX}/bin|g' ${WRKSRC}/bin/google_oslogin_control + @${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!' \ + ${WRKSRC}/bin/google_oslogin_control \ + ${WRKSRC}/libnss_cache_oslogin/nss_cache_oslogin.c \ + ${WRKSRC}/nss_cache/nss_cache.cc post-install: ${LN} -sf libnss_${PORTNAME}-${DISTVERSION}.so ${STAGEDIR}${PREFIX}/lib/nss_oslogin.so.1 Modified: head/sysutils/google-compute-engine-oslogin/distinfo ============================================================================== --- head/sysutils/google-compute-engine-oslogin/distinfo Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/distinfo Fri Nov 23 19:43:44 2018 (r485700) @@ -1,3 +1,3 @@ -TIMESTAMP = 1528807879 -SHA256 (GoogleCloudPlatform-compute-image-packages-1.3.0-20180611_GH0.tar.gz) = f71bdc6d01cff014bb4d066096be9a6e067fd3028c730cc4c9557001ec99ab6e -SIZE (GoogleCloudPlatform-compute-image-packages-1.3.0-20180611_GH0.tar.gz) = 143678 +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 Modified: head/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control ============================================================================== --- head/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control Fri Nov 23 19:43:44 2018 (r485700) @@ -1,5 +1,23 @@ ---- bin/google_oslogin_control.orig 2018-06-11 17:16:50 UTC +--- 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() { Modified: head/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c ============================================================================== --- head/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c Fri Nov 23 19:43:44 2018 (r485700) @@ -1,4 +1,4 @@ ---- libnss_cache_oslogin/nss_cache_oslogin.c.orig 2018-06-11 17:16:50 UTC +--- libnss_cache_oslogin/nss_cache_oslogin.c.orig 2018-10-11 16:53:23 UTC +++ libnss_cache_oslogin/nss_cache_oslogin.c @@ -16,6 +16,7 @@ @@ -8,19 +8,20 @@ #include // Locking implementation: use pthreads. -@@ -32,7 +33,7 @@ static pthread_mutex_t mutex = PTHREAD_M +@@ -32,7 +33,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZ static FILE *p_file = NULL; static char p_filename[NSS_CACHE_OSLOGIN_PATH_LENGTH] = - "/etc/oslogin_passwd.cache"; -+ "/usr/local/etc/oslogin_passwd.cache"; ++ "%%PREFIX%%/etc/oslogin_passwd.cache"; #ifdef BSD extern int fgetpwent_r(FILE *, struct passwd *, char *, size_t, struct passwd **); -@@ -435,3 +436,26 @@ enum nss_status _nss_cache_oslogin_getpw +@@ -434,4 +435,27 @@ enum nss_status _nss_cache_oslogin_getpwnam_r(const ch + NSS_CACHE_OSLOGIN_UNLOCK(); return ret; - } ++} + +NSS_METHOD_PROTOTYPE(__nss_compat_getpwnam_r); +NSS_METHOD_PROTOTYPE(__nss_compat_getpwuid_r); @@ -43,4 +44,4 @@ + *size = sizeof (methods) / sizeof (methods[0]); + *unregister = NULL; + return (methods); -+} + } Modified: head/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc ============================================================================== --- head/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc Fri Nov 23 19:43:44 2018 (r485700) @@ -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[] = "/usr/local/etc/oslogin_passwd.cache"; -+static const char kDefaultBackupFilePath[] = "/usr/local/etc/oslogin_passwd.cache.bak"; ++static const char kDefaultFilePath[] = "%%PREFIX%%/etc/oslogin_passwd.cache"; ++static const char kDefaultBackupFilePath[] = "%%PREFIX%%/etc/oslogin_passwd.cache.bak"; // Local NSS Cache size. This affects the maximum number of passwd entries per // http request. Modified: head/sysutils/google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc ============================================================================== --- head/sysutils/google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc Fri Nov 23 19:43:44 2018 (r485700) @@ -1,4 +1,4 @@ ---- nss_module/nss_oslogin.cc.orig 2018-06-11 17:16:50 UTC +--- nss_module/nss_oslogin.cc.orig 2018-10-11 16:53:23 UTC +++ nss_module/nss_oslogin.cc @@ -16,6 +16,7 @@ #include @@ -8,7 +8,7 @@ #include #include #include -@@ -103,4 +104,30 @@ int _nss_oslogin_getpwnam_r(const char * +@@ -103,4 +104,30 @@ int _nss_oslogin_getpwnam_r(const char *name, struct p // nss_getpwent_r() is intentionally left unimplemented. This functionality is // now covered by the nss_cache binary and nss_cache module. Modified: head/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc ============================================================================== --- head/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc Fri Nov 23 19:43:44 2018 (r485700) @@ -1,4 +1,4 @@ ---- pam_module/pam_oslogin_admin.cc.orig 2018-06-11 17:16:50 UTC +--- pam_module/pam_oslogin_admin.cc.orig 2018-10-11 16:53:23 UTC +++ pam_module/pam_oslogin_admin.cc @@ -14,7 +14,6 @@ @@ -8,7 +8,7 @@ #include #include #include -@@ -47,7 +46,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_hand +@@ -48,7 +47,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) { @@ -17,7 +17,7 @@ return pam_result; } string str_user_name(user_name); -@@ -77,7 +76,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_hand +@@ -82,7 +81,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)) { if (!file_exists) { Modified: head/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc ============================================================================== --- head/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc Fri Nov 23 19:43:44 2018 (r485700) @@ -1,4 +1,4 @@ ---- pam_module/pam_oslogin_login.cc.orig 2018-06-11 17:16:50 UTC +--- pam_module/pam_oslogin_login.cc.orig 2018-10-11 16:53:23 UTC +++ pam_module/pam_oslogin_login.cc @@ -14,7 +14,6 @@ @@ -8,7 +8,7 @@ #include #include #include -@@ -45,7 +44,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_hand +@@ -46,7 +45,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); -@@ -88,7 +87,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_hand +@@ -93,7 +92,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,7 +26,7 @@ "Granting login permission for organization user %s.", user_name); pam_result = PAM_SUCCESS; -@@ -96,7 +95,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_hand +@@ -101,7 +100,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, in if (file_exists) { remove(users_filename.c_str()); } Modified: head/sysutils/google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc ============================================================================== --- head/sysutils/google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc Fri Nov 23 19:26:37 2018 (r485699) +++ head/sysutils/google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc Fri Nov 23 19:43:44 2018 (r485700) @@ -1,17 +1,28 @@ ---- utils/oslogin_utils.cc.orig 2018-06-11 17:16:50 UTC +--- utils/oslogin_utils.cc.orig 2018-11-13 21:29:55 UTC +++ utils/oslogin_utils.cc -@@ -255,7 +255,14 @@ bool ValidatePasswd(struct passwd* resul +@@ -23,8 +23,7 @@ + #include + #include + +-#ifdef __GNUC__ +-#if __GNUC__ > 4 || \ ++#if defined(__clang__) || __GNUC__ > 4 || \ + (__GNUC__ == 4 && (__GNUC_MINOR__ > 9 || \ + (__GNUC_MINOR__ == 9 && \ + __GNUC_PATCHLEVEL__ > 0))) +@@ -34,7 +33,6 @@ + #include + #define Regex boost + #endif +-#endif + + #include "oslogin_utils.h" + +@@ -279,7 +277,7 @@ bool ValidatePasswd(struct passwd* result, BufferManag } } if (strlen(result->pw_shell) == 0) { - if (!buf->AppendString("/bin/bash", &result->pw_shell, errnop)) { -+ if (!buf->AppendString("/bin/sh", &result->pw_shell, errnop)) { -+ return false; -+ } -+ } -+ -+ // If shell is set to /bin/bash, fallback to /bin/sh -+ if (strcmp(result->pw_shell, "/bin/bash") == 0 ) { + if (!buf->AppendString("/bin/sh", &result->pw_shell, errnop)) { return false; }