svn commit: r485700 - in head/sysutils/google-compute-engine-oslogin: . files
Steve Wills
swills at FreeBSD.org
Fri Nov 23 19:43:47 UTC 2018
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 <lucas.kanashiro at collabora.com>
Approved by: Helen Koike <helen.koike at collabora.com> (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 at 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 <sys/mman.h>
// 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 <errno.h>
@@ -8,7 +8,7 @@
#include <pthread.h>
#include <pwd.h>
#include <sys/types.h>
-@@ -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 <security/pam_modules.h>
#include <sys/stat.h>
#include <sys/types.h>
-@@ -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 <security/pam_modules.h>
#include <sys/stat.h>
#include <sys/types.h>
-@@ -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 <iostream>
+ #include <sstream>
+
+-#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 <boost/regex.hpp>
+ #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;
}
More information about the svn-ports-all
mailing list