further fix for bug 175434
This commit is contained in:
parent
0a2386cc62
commit
b4c56542e4
@ -15,7 +15,7 @@
|
|||||||
Summary: OpenPegasus WBEM Services for Linux
|
Summary: OpenPegasus WBEM Services for Linux
|
||||||
Name: tog-pegasus
|
Name: tog-pegasus
|
||||||
Version: 2.5
|
Version: 2.5
|
||||||
Release: 7
|
Release: 8
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Group: Systems Management/Base
|
Group: Systems Management/Base
|
||||||
License: Open Group Pegasus Open Source
|
License: Open Group Pegasus Open Source
|
||||||
@ -204,9 +204,19 @@ if [ $1 -gt 1 ]; then
|
|||||||
elif [ $1 -eq 1 ]; then
|
elif [ $1 -eq 1 ]; then
|
||||||
# first install: create the 'pegasus' user and group:
|
# first install: create the 'pegasus' user and group:
|
||||||
# By default, ONLY the "pegasus" user will be allowed to connect to cimserver over network
|
# By default, ONLY the "pegasus" user will be allowed to connect to cimserver over network
|
||||||
/usr/sbin/groupadd pegasus -g 65 >/dev/null 2>&1 || :;
|
# create pegasus group IFF it does not already exist
|
||||||
/usr/sbin/useradd -u 66 -c "tog-pegasus OpenPegasus WBEM/CIM services" -g pegasus \
|
# - use any free ID between 1 and 499 if group 65 exists:
|
||||||
-s /sbin/nologin -r -d /var/lib/Pegasus pegasus >/dev/null 2>&1 || :;
|
/usr/sbin/groupadd -g 65 -f -r pegasus >/dev/null 2>&1 || :;
|
||||||
|
if ! /usr/bin/id -u pegasus > /dev/null 2>&1; then
|
||||||
|
if ! /bin/egrep -q '^[^:]+:[^:]+:66:' /etc/passwd >/dev/null 2>&1 ; then
|
||||||
|
/usr/sbin/useradd -u 66 -r -n -M -g pegasus -s /sbin/nologin -r -d /var/lib/Pegasus \
|
||||||
|
-c "tog-pegasus OpenPegasus WBEM/CIM services" pegasus >/dev/null 2>&1 || :;
|
||||||
|
else
|
||||||
|
# use any free ID between 1 and 499:
|
||||||
|
/usr/sbin/useradd -r -n -M -g pegasus -s /sbin/nologin -r -d /var/lib/Pegasus \
|
||||||
|
-c "tog-pegasus OpenPegasus WBEM/CIM services" pegasus >/dev/null 2>&1 || :;
|
||||||
|
fi;
|
||||||
|
fi;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
@ -239,6 +249,10 @@ rm -rf $RPM_BUILD_ROOT;
|
|||||||
#rm -rf ${RPM_BUILD_DIR}/%{srcname}-%{version};
|
#rm -rf ${RPM_BUILD_DIR}/%{srcname}-%{version};
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 07 2006 Jason Vas Dias <jvdias@redhat.com> - 2.2.5-8
|
||||||
|
- fix creation of userid / gid - the previous fix can fail if
|
||||||
|
gid 65 or uid 66 exists already.
|
||||||
|
|
||||||
* Tue Mar 7 2006 Bill Nottingham <notting@redhat.com> - 2:2.5-7
|
* Tue Mar 7 2006 Bill Nottingham <notting@redhat.com> - 2:2.5-7
|
||||||
- use an assigned uid/gid, do not loop over user ids looking for a free one
|
- use an assigned uid/gid, do not loop over user ids looking for a free one
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user