diff options
author | Jim Li - Sun Microsystems - Beijing China <Jim.Li@Sun.COM> | 2008-09-20 05:01:33 +0800 |
---|---|---|
committer | Jim Li - Sun Microsystems - Beijing China <Jim.Li@Sun.COM> | 2008-09-20 05:01:33 +0800 |
commit | e5ed77eb84ab73cba03914971dba76b740b42a1f (patch) | |
tree | 3c261214ca1f861e920302dd36fb9afbd95d0c65 | |
parent | 030a4fdfe6d7b7b6f14fd34f0a891d4c5361d119 (diff) | |
download | illumos-joyent-e5ed77eb84ab73cba03914971dba76b740b42a1f.tar.gz |
6738568 Add default group for Slocate
-rw-r--r-- | usr/src/cmd/Adm/group | 1 | ||||
-rw-r--r-- | usr/src/pkgdefs/common_files/i.group | 20 | ||||
-rw-r--r-- | usr/src/tools/protocmp/stdusers.c | 3 |
3 files changed, 20 insertions, 4 deletions
diff --git a/usr/src/cmd/Adm/group b/usr/src/cmd/Adm/group index d59f46c7cc..8589f2b7f4 100644 --- a/usr/src/cmd/Adm/group +++ b/usr/src/cmd/Adm/group @@ -18,6 +18,7 @@ xvm::60: mysql::70: webservd::80: postgres::90: +slocate::95: nobody::60001: noaccess::60002: nogroup::65534: diff --git a/usr/src/pkgdefs/common_files/i.group b/usr/src/pkgdefs/common_files/i.group index a1da98e187..ddf5fbcbb2 100644 --- a/usr/src/pkgdefs/common_files/i.group +++ b/usr/src/pkgdefs/common_files/i.group @@ -20,8 +20,6 @@ # CDDL HEADER END # # -# ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -233,6 +231,24 @@ do printf '/^mysql::70:\ni\n%s\n.\nw\nq\n' \ "$XVMGROUP_LINE" | ed -s $dest > /dev/null fi + # + # Add the 'slocate' group if it doesn't already exist. + # + SLOCATEGROUP_LINE="slocate::95:" + cur_name=`awk -F: '$3 == 95 {print $1}' $dest` + cur_id=`awk -F: '$1 == "slocate" {print $3}' $dest` + if [ ! -z "$cur_name" -a "$cur_name" != "slocate" ]; then + echo "ERROR: Reserved GID 95 already assigned" \ + "to '$cur_name'" >> /tmp/CLEANUP + elif [ ! -z "$cur_id" -a "$cur_id" != "95" ]; then + echo "NOTE: slocate group already assigned" \ + "to id '$cur_id'" >> /tmp/CLEANUP + elif grep "$SLOCATEGROUP_LINE" $dest 2>&1 >/dev/null; then + : + else + printf '/^postgres::90:\na\n%s\n.\nw\nq\n' \ + "$SLOCATEGROUP_LINE" | ed -s $dest > /dev/null + fi fi done exit 0 diff --git a/usr/src/tools/protocmp/stdusers.c b/usr/src/tools/protocmp/stdusers.c index 6feba55b85..563576f8d1 100644 --- a/usr/src/tools/protocmp/stdusers.c +++ b/usr/src/tools/protocmp/stdusers.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <string.h> #include "stdusers.h" @@ -72,6 +70,7 @@ const struct stdlist groupnames[] = { { "mysql", 70 }, { "webservd", 80 }, { "postgres", 90 }, + { "slocate", 95 }, { "nobody", 60001 }, { "noaccess", 60002 }, { "nogroup", 65534 }, |