Accepting request 142284 from Base:System

- Change user_group_add macro to not invoke useradd and groupadd
  with -o parameter. Non-unique does not make sense when not
  passing -u/-g (useradd/groupadd) and fails on newer pwdutils/
  shadowurils implementations. The macro does not allow for a
  uid/gid being passed. (forwarded request 142177 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/142284
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=193
This commit is contained in:
Stephan Kulow 2012-11-22 16:22:55 +00:00 committed by Git OBS Bridge
commit 65ab9964ed
2 changed files with 11 additions and 2 deletions

View File

@ -313,7 +313,7 @@
+%service_del_postun() %{restart_on_update %{1}}
+
+%user_group_add() \
+/usr/sbin/groupadd -o -r %{1} 2>/dev/null || :\
+/usr/sbin/useradd -o -r -g %{1} -d %{2} -s %{3} -c %{4} %{1} 2>/dev/null || :\
+/usr/sbin/groupadd -r %{1} 2>/dev/null || :\
+/usr/sbin/useradd -r -g %{1} -d %{2} -s %{3} -c %{4} %{1} 2>/dev/null || :\
+%{nil}
+

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Nov 20 18:47:06 UTC 2012 - dimstar@opensuse.org
- Change user_group_add macro to not invoke useradd and groupadd
with -o parameter. Non-unique does not make sense when not
passing -u/-g (useradd/groupadd) and fails on newer pwdutils/
shadowurils implementations. The macro does not allow for a
uid/gid being passed.
-------------------------------------------------------------------
Mon Nov 12 10:29:13 UTC 2012 - coolo@suse.com