Accepting request 142177 from home:dimstar:branches: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.

OBS-URL: https://build.opensuse.org/request/show/142177
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=243
This commit is contained in:
2012-11-21 15:04:27 +00:00
committed by Git OBS Bridge
parent 7c2b006b7d
commit e325393a07
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}
+