FreeBSD Bugzilla – Attachment 204594 Details for
Bug 238105
sysutils/google-compute-engine-oslogin: patches to fix linux-isms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to correct 3 bugs in google-oslogin-control
google-compute-engine-oslogin.diff (text/plain), 2.58 KB, created by
jay
on 2019-05-24 14:58:54 UTC
(
hide
)
Description:
Patch to correct 3 bugs in google-oslogin-control
Filename:
MIME Type:
Creator:
jay
Created:
2019-05-24 14:58:54 UTC
Size:
2.58 KB
patch
obsolete
>Index: sysutils/google-compute-engine-oslogin/files/patch-google_oslogin_control >=================================================================== >--- sysutils/google-compute-engine-oslogin/files/patch-google_oslogin_control (nonexistent) >+++ sysutils/google-compute-engine-oslogin/files/patch-google_oslogin_control (working copy) >@@ -0,0 +1,53 @@ >+--- ./google_oslogin_control.orig 2019-05-24 10:13:56.497374000 -0400 >++++ google_oslogin_control 2019-05-24 10:18:05.172252000 -0400 >+@@ -13,6 +13,11 @@ >+ # See the License for the specific language governing permissions and >+ # limitations under the License. >+ >++is_freebsd() { >++ [ "$(uname)" = "FreeBSD" ] >++ return $? >++} >++ >+ nss_config="/etc/nsswitch.conf" >+ pam_sshd_config="/etc/pam.d/sshd" >+ pam_su_config="/etc/pam.d/su" >+@@ -20,16 +25,14 @@ >+ group_config="/etc/security/group.conf" >+ sudoers_dir="/var/google-sudoers.d" >+ users_dir="/var/google-users.d" >+-sudoers_file="/etc/sudoers.d/google-oslogin" >+ added_comment="# Added by Google Compute Engine OS Login." >+ sshd_block="#### Google OS Login control. Do not edit this section. ####" >+ sshd_end_block="#### End Google OS Login control section. ####" >++sudoers_file="/etc/sudoers.d/google-oslogin" >++if is_freebsd; then >++ sudoers_file="/usr/local/etc/sudoers.d/google-oslogin" >++fi >+ >+-is_freebsd() { >+- [ "$(uname)" = "FreeBSD" ] >+- return $? >+-} >+- >+ # Update nsswitch.conf to include OS Login NSS module for passwd. >+ modify_nsswitch_conf() { >+ local nss_config="${1:-${nss_config}}" >+@@ -97,7 +100,7 @@ >+ if ! grep -q "$sshd_block" "$sshd_config"; then >+ # Remove old-style additions. >+ $sed -i"" "/${added_comment}/,+1d" "$sshd_config" >+- /bin/echo -e "\n\n${sshd_block}\n${sshd_end_block}" >> "$sshd_config" >++ printf "\n\n${sshd_block}\n${sshd_end_block}" >> "$sshd_config" >+ fi >+ >+ for entry in "$sshd_auth_keys_command" "$sshd_auth_keys_command_user"; do >+@@ -283,7 +286,7 @@ >+ >+ # Use the service helper if it exists. >+ if command -v service > /dev/null; then >+- if ! service "$service" status 2>&1 | grep -q unrecognized; then >++ if ! service "$service" status 2>&1 | grep -Eq "unrecognized|does not exist"; then >+ service "$service" restart >+ return $? >+ else > >Property changes on: sysutils/google-compute-engine-oslogin/files/patch-google_oslogin_control >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
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 238105
: 204594 |
204653