FreeBSD Bugzilla – Attachment 218070 Details for
Bug 246298
sysutils/google-compute-engine-oslogin: pw process freezes (cannot add user accounts)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
goo.diff (text/plain), 9.79 KB, created by
Kurt Jaeger
on 2020-09-19 09:59:55 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Kurt Jaeger
Created:
2020-09-19 09:59:55 UTC
Size:
9.79 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 548933) >+++ Makefile (working copy) >@@ -1,8 +1,7 @@ > # $FreeBSD$ > > PORTNAME= google-compute-engine-oslogin >-DISTVERSION= 20191018.00 >-PORTREVISION= 1 >+DISTVERSION= 20200918.00 > CATEGORIES= sysutils > > MAINTAINER= ports@FreeBSD.org >@@ -21,10 +20,8 @@ > USE_GITHUB= yes > GH_ACCOUNT= GoogleCloudPlatform > GH_PROJECT= guest-oslogin >-GH_TAGNAME= 5a710bb >+GH_TAGNAME= 4076091 > >-PLIST_SUB+= DISTVERSION=${DISTVERSION} >- > MAKE_ARGS= CPPFLAGS="-Iinclude -I${LOCALBASE}/include/json-c -I${LOCALBASE}/include" \ > LDLIBS="-lcurl -ljson-c -L${LOCALBASE}/lib" \ > DESTDIR=${STAGEDIR}${PREFIX} \ >@@ -34,11 +31,12 @@ > MANDIR=${PREFIX}/man > > post-install: >- ${LN} -sf libnss_oslogin-${DISTVERSION}.so ${STAGEDIR}${PREFIX}/lib/nss_oslogin.so.1 >- ${LN} -sf libnss_cache_oslogin-${DISTVERSION}.so ${STAGEDIR}${PREFIX}/lib/nss_cache_oslogin.so.1 >+ ${LN} -sf libnss_oslogin.so ${STAGEDIR}${PREFIX}/lib/nss_oslogin.so.2 >+ ${LN} -sf libnss_cache_oslogin.so ${STAGEDIR}${PREFIX}/lib/nss_cache_oslogin.so.2 > ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/google_authorized_keys \ >- ${STAGEDIR}${PREFIX}/lib/libnss_oslogin-${DISTVERSION}.so \ >- ${STAGEDIR}${PREFIX}/lib/libnss_cache_oslogin-${DISTVERSION}.so \ >+ ${STAGEDIR}${PREFIX}/bin/google_oslogin_nss_cache \ >+ ${STAGEDIR}${PREFIX}/lib/libnss_oslogin.so \ >+ ${STAGEDIR}${PREFIX}/lib/libnss_cache_oslogin.so \ > ${STAGEDIR}${PREFIX}/lib/pam_oslogin_admin.so \ > ${STAGEDIR}${PREFIX}/lib/pam_oslogin_login.so > >Index: distinfo >=================================================================== >--- distinfo (revision 548933) >+++ distinfo (working copy) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1571819820 >-SHA256 (GoogleCloudPlatform-guest-oslogin-20191018.00-5a710bb_GH0.tar.gz) = e2416461d61b1f4a81cf13a883ea2922271d09882c951eec61c1d3ca398c927e >-SIZE (GoogleCloudPlatform-guest-oslogin-20191018.00-5a710bb_GH0.tar.gz) = 36556 >+TIMESTAMP = 1600502715 >+SHA256 (GoogleCloudPlatform-guest-oslogin-20200918.00-4076091_GH0.tar.gz) = 03832cbc6d35593eebea8c6c6d66b69cb6abc5a22ae6dfbf61a73e767de2295c >+SIZE (GoogleCloudPlatform-guest-oslogin-20200918.00-4076091_GH0.tar.gz) = 43256 >Index: files/patch-src_Makefile >=================================================================== >--- files/patch-src_Makefile (revision 548933) >+++ files/patch-src_Makefile (working copy) >@@ -1,29 +1,59 @@ >---- src/Makefile.orig 2019-10-23 08:18:46 UTC >+--- src/Makefile.orig 2020-09-18 19:18:56 UTC > +++ src/Makefile >-@@ -70,17 +70,21 @@ install: all >- install -d $(DESTDIR)$(PAMDIR) >+@@ -24,8 +24,10 @@ PRESETDIR = /lib/systemd/system-preset >+ NSS_OSLOGIN_SONAME = libnss_oslogin.so.2 >+ NSS_CACHE_OSLOGIN_SONAME = libnss_cache_oslogin.so.2 >+ >+-NSS_OSLOGIN = libnss_oslogin-$(VERSION).so >+-NSS_CACHE_OSLOGIN = libnss_cache_oslogin-$(VERSION).so >++#NSS_OSLOGIN = libnss_oslogin-$(VERSION).so >++#NSS_CACHE_OSLOGIN = libnss_cache_oslogin-$(VERSION).so >++NSS_OSLOGIN = libnss_oslogin.so >++NSS_CACHE_OSLOGIN = libnss_cache_oslogin.so >+ >+ PAM_LOGIN = pam_oslogin_login.so >+ PAM_ADMIN = pam_oslogin_admin.so >+@@ -73,15 +75,21 @@ install: all > install -d $(DESTDIR)$(BINDIR) > install -d $(DESTDIR)$(MANDIR)/man8 >+ # NSS modules > - install -m 0644 -t $(DESTDIR)$(LIBDIR) $(NSS_OSLOGIN) $(NSS_CACHE_OSLOGIN) > + install -m 0644 $(NSS_CACHE_OSLOGIN) $(DESTDIR)$(LIBDIR) > + install -m 0644 $(NSS_OSLOGIN) $(DESTDIR)$(LIBDIR) > ln -sf $(NSS_OSLOGIN) $(DESTDIR)$(LIBDIR)/$(NSS_OSLOGIN_SONAME) > ln -sf $(NSS_CACHE_OSLOGIN) $(DESTDIR)$(LIBDIR)/$(NSS_CACHE_OSLOGIN_SONAME) >+ # PAM modules > - install -m 0644 -t $(DESTDIR)$(PAMDIR) $(PAM_ADMIN) $(PAM_LOGIN) >-- install -m 0755 -t $(DESTDIR)$(BINDIR) $(BINARIES) $(TOPDIR)/google_oslogin_control >-- install -m 0644 -t $(DESTDIR)$(MANDIR)/man8 $(TOPDIR)/man/nss-oslogin.8 $(TOPDIR)/man/nss-cache-oslogin.8 > + install -m 0644 $(PAM_LOGIN) $(DESTDIR)$(PAMDIR) > + install -m 0644 $(PAM_ADMIN) $(DESTDIR)$(PAMDIR) >++ >+ # Control file >+- install -m 0755 -t $(DESTDIR)$(BINDIR) $(BINARIES) $(TOPDIR)/google_oslogin_control > + install -m 0755 $(TOPDIR)/google_oslogin_control $(DESTDIR)$(BINDIR) > + install -m 0755 $(BINARIES) $(DESTDIR)$(BINDIR) >++ >+ # Manpages >+- install -m 0644 -t $(DESTDIR)$(MANDIR)/man8 $(TOPDIR)/man/nss-oslogin.8 $(TOPDIR)/man/nss-cache-oslogin.8 >++ install -m 0644 $(TOPDIR)/man/nss-oslogin.8 $(DESTDIR)$(MANDIR)/man8 > + install -m 0644 $(TOPDIR)/man/nss-cache-oslogin.8 $(DESTDIR)$(MANDIR)/man8 >-+ install -m 0644 $(TOPDIR)/man/nss-oslogin.8 $(DESTDIR)$(MANDIR)/man8 > gzip -9 $(DESTDIR)$(MANDIR)/man8/nss-oslogin.8 > gzip -9 $(DESTDIR)$(MANDIR)/man8/nss-cache-oslogin.8 > ln -sf nss-oslogin.8.gz $(DESTDIR)$(MANDIR)/man8/$(NSS_OSLOGIN_SONAME).8.gz >- ln -sf nss-cache-oslogin.8.gz $(DESTDIR)$(MANDIR)/man8/$(NSS_CACHE_OSLOGIN_SONAME).8.gz >+@@ -89,16 +97,10 @@ install: all > ifdef INSTALL_SELINUX >+ # SELinux policy package > install -d $(DESTDIR)/usr/share/selinux/packages > - install -m 0644 -t $(DESTDIR)/usr/share/selinux/packages $(TOPDIR)/selinux/oslogin.pp > + install -m 0644 $(TOPDIR)/selinux/oslogin.pp $(DESTDIR)/usr/share/selinux/packages > endif >+ ifdef INSTALL_CRON >+ # Cache refresh cron >+ install -d $(DESTDIR)$(CRONDIR) >+ install -m 0644 $(TOPDIR)/cron.d $(DESTDIR)$(CRONDIR)/google-compute-engine-oslogin >+-else >+- # Cache refresh systemd timer >+- install -d $(DESTDIR)$(SYSTEMDDIR) >+- install -m 0644 -t $(DESTDIR)$(SYSTEMDDIR) $(TOPDIR)/google-oslogin-cache.timer $(TOPDIR)/google-oslogin-cache.service >+- install -d $(DESTDIR)$(PRESETDIR) >+- install -m 0644 -t $(DESTDIR)$(PRESETDIR) $(TOPDIR)/90-google-compute-engine-oslogin.preset >+ endif >Index: files/patch-src_nss_nss__cache__oslogin.c >=================================================================== >--- files/patch-src_nss_nss__cache__oslogin.c (revision 548933) >+++ files/patch-src_nss_nss__cache__oslogin.c (nonexistent) >@@ -1,11 +0,0 @@ >---- src/nss/nss_cache_oslogin.c.orig 2019-10-23 07:01:45 UTC >-+++ src/nss/nss_cache_oslogin.c >-@@ -439,7 +439,7 @@ DECLARE_NSS_METHOD_TABLE(methods, >- { NSDB_PASSWD, "getgrent_r", __nss_compat_getgrent_r, >- (void*)_nss_cache_oslogin_getgrent_r }, >- { NSDB_PASSWD, "endgrent", __nss_compat_endgrent, >-- (void*)_nss_cache_oslogin_endgrent }, >-+ (void*)_nss_cache_endgrent }, >- { NSDB_PASSWD, "setgrent", __nss_compat_setgrent, >- (void*)_nss_cache_oslogin_setgrent }, >- ) > >Property changes on: files/patch-src_nss_nss__cache__oslogin.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-src_nss_nss__oslogin.cc >=================================================================== >--- files/patch-src_nss_nss__oslogin.cc (revision 548933) >+++ files/patch-src_nss_nss__oslogin.cc (working copy) >@@ -1,11 +1,11 @@ >---- src/nss/nss_oslogin.cc.orig 2019-10-23 06:43:42 UTC >+--- src/nss/nss_oslogin.cc.orig 2020-09-18 19:18:56 UTC > +++ src/nss/nss_oslogin.cc >-@@ -225,7 +225,7 @@ enum nss_status _nss_oslogin_initgroups_dyn(const char >- if (p_file == NULL) >+@@ -226,7 +226,7 @@ enum nss_status _nss_oslogin_initgroups_dyn(const char > return NSS_STATUS_NOTFOUND; >+ > struct passwd *userp; >-- while ((userp = fgetpwent(p_file)) != NULL) >-+ while ((userp = getpwent()) != NULL) >- if (strcmp(userp->pw_name, user) == 0) >+- while ((userp = fgetpwent(p_file)) != NULL) { >++ while ((userp = getpwent()) != NULL) { >+ if (strcmp(userp->pw_name, user) == 0) { >+ fclose(p_file); > return NSS_STATUS_NOTFOUND; >- fclose(p_file); >Index: pkg-descr >=================================================================== >--- pkg-descr (revision 548933) >+++ pkg-descr (working copy) >@@ -2,17 +2,18 @@ > instances. > The OS Login package has the following components: > >-- Authorized Keys Command to fetch SSH keys from the user's OS Login profile and >-make them available to sshd. >+- Authorized Keys Command to fetch SSH keys from the user's OS Login >+ profile and make them available to sshd. > - NSS Module provides support for making OS Login user and group information >-available to the system, using NSS (Name Service Switch) functionality. >-- PAM Module provides authorization and authentication support allowing the >-system to use data stored in Google Cloud IAM permissions to control both, the >-ability to log into an instance, and to perform operations as root (sudo). >+ available to the system, using NSS (Name Service Switch) functionality. >+- PAM Module provides authorization and authentication support >+ allowing the system to use data stored in Google Cloud IAM permissions >+ to control both, the ability to log into an instance, and to perform >+ operations as root (sudo). > - Utils provides common code to support the components listed above. > >-In addition to the main components, there are also utilities for packaging and >-installing these components: >+In addition to the main components, there are also utilities for >+packaging and installing these components: > > - bin contains a shell script for (de)activating the package components. > >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 548933) >+++ pkg-plist (working copy) >@@ -1,12 +1,12 @@ > bin/google_authorized_keys > bin/google_oslogin_control > bin/google_oslogin_nss_cache >-lib/libnss_cache_oslogin-%%DISTVERSION%%.so >+lib/libnss_cache_oslogin.so > lib/libnss_cache_oslogin.so.2 >-lib/libnss_oslogin-%%DISTVERSION%%.so >+lib/libnss_oslogin.so > lib/libnss_oslogin.so.2 >-lib/nss_cache_oslogin.so.1 >-lib/nss_oslogin.so.1 >+lib/nss_cache_oslogin.so.2 >+lib/nss_oslogin.so.2 > lib/pam_oslogin_admin.so > lib/pam_oslogin_login.so > man/man8/libnss_cache_oslogin.so.2.8.gz
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 246298
:
214254
| 218070