From 208027cd7e14f4c1aafdfdec510ddf3850a2a7ad1214a812fc5c56f0d80404d5 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 15 Mar 2017 19:52:50 +0000 Subject: [PATCH 1/3] Accepting request 479795 from home:kukuk:sysusers - Add systemusers wwwrun, mail and ftp OBS-URL: https://build.opensuse.org/request/show/479795 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=7 --- system-user-ftp.conf | 3 +++ system-user-mail.conf | 3 +++ system-user-wwwrun.conf | 4 ++++ system-users.changes | 5 ++++ system-users.spec | 53 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 system-user-ftp.conf create mode 100644 system-user-mail.conf create mode 100644 system-user-wwwrun.conf diff --git a/system-user-ftp.conf b/system-user-ftp.conf new file mode 100644 index 0000000..538d169 --- /dev/null +++ b/system-user-ftp.conf @@ -0,0 +1,3 @@ +# Type Name ID GECOS [HOME] +u ftp - "FTP Account" /srv/ftp +g ftp - diff --git a/system-user-mail.conf b/system-user-mail.conf new file mode 100644 index 0000000..6d94b5c --- /dev/null +++ b/system-user-mail.conf @@ -0,0 +1,3 @@ +# Type Name ID GECOS [HOME] +u mail - "Mailer daemon" /var/spool/clientmqueue +g mail - diff --git a/system-user-wwwrun.conf b/system-user-wwwrun.conf new file mode 100644 index 0000000..30b1605 --- /dev/null +++ b/system-user-wwwrun.conf @@ -0,0 +1,4 @@ +# Type Name ID GECOS [HOME] +g www - +u wwwrun - "WWW daemon apache" /var/lib/wwwrun +m wwwrun www diff --git a/system-users.changes b/system-users.changes index b65a707..753bab4 100644 --- a/system-users.changes +++ b/system-users.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 15 20:47:27 CET 2017 - kukuk@suse.de + +- Add systemusers wwwrun, mail and ftp + ------------------------------------------------------------------- Sat Mar 11 09:29:37 CET 2017 - kukuk@suse.de diff --git a/system-users.spec b/system-users.spec index 6d42f5d..aa35f97 100644 --- a/system-users.spec +++ b/system-users.spec @@ -32,6 +32,9 @@ Source7: system-group-trusted.conf Source8: system-group-obsolete.conf Source9: system-group-hardware.conf Source10: system-group-wheel.conf +Source11: system-user-wwwrun.conf +Source12: system-user-mail.conf +Source13: system-user-ftp.conf BuildRequires: systemd BuildRequires: sysuser-tools BuildArch: noarch @@ -126,6 +129,29 @@ Group: System/Fhs %description -n system-group-wheel This package provides the system group 'wheel'. +%package -n system-user-wwwrun +Summary: System user wwwrun and group www +Group: System/Fhs +%{sysusers_requires} + +%description -n system-user-wwwrun +This package provides the system account 'wwwrun' and group 'www'. + +%package -n system-user-mail +Summary: System user and group mail +Group: System/Fhs +%{sysusers_requires} + +%description -n system-user-mail +This package provides the system account and group 'mail'. + +%package -n system-user-ftp +Summary: System user and group ftp +Group: System/Fhs +%{sysusers_requires} + +%description -n system-user-ftp +This package provides the system account and group 'ftp'. %prep %setup -q -c -T @@ -141,6 +167,9 @@ This package provides the system group 'wheel'. %sysusers_generate_pre %{SOURCE8} obsolete %sysusers_generate_pre %{SOURCE9} hardware %sysusers_generate_pre %{SOURCE10} wheel +%sysusers_generate_pre %{SOURCE11} wwwrun +%sysusers_generate_pre %{SOURCE12} mail +%sysusers_generate_pre %{SOURCE13} ftp %install mkdir -p %{buildroot}%{_sysusersdir} @@ -148,6 +177,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/uucp mkdir -p %{buildroot}%{_sysconfdir}/news mkdir -p %{buildroot}%{_localstatedir}/games mkdir -p %{buildroot}%{_localstatedir}/cache/man +mkdir -p %{buildroot}%{_localstatedir}/lib/wwwrun +mkdir -p %{buildroot}%{_localstatedir}/spool/clientmqueue +mkdir -p %{buildroot}/srv/ftp install -m 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/system-user-uucp.conf install -m 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/system-user-games.conf install -m 644 %{SOURCE3} %{buildroot}%{_sysusersdir}/system-user-bin.conf @@ -158,6 +190,9 @@ install -m 644 %{SOURCE7} %{buildroot}%{_sysusersdir}/system-group-trusted.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysusersdir}/system-group-obsolete.conf install -m 644 %{SOURCE9} %{buildroot}%{_sysusersdir}/system-group-hardware.conf install -m 644 %{SOURCE10} %{buildroot}%{_sysusersdir}/system-group-wheel.conf +install -m 644 %{SOURCE11} %{buildroot}%{_sysusersdir}/system-user-wwwrun.conf +install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/system-user-mail.conf +install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/system-user-ftp.conf %pre -n system-user-uucp -f uucp.pre %pre -n system-user-games -f games.pre @@ -169,6 +204,9 @@ install -m 644 %{SOURCE10} %{buildroot}%{_sysusersdir}/system-group-wheel.conf %pre -n system-group-obsolete -f obsolete.pre %pre -n system-group-hardware -f hardware.pre %pre -n system-group-wheel -f wheel.pre +%pre -n system-user-wwwrun -f wwwrun.pre +%pre -n system-user-mail -f mail.pre +%pre -n system-user-ftp -f ftp.pre %files -n system-user-uucp %defattr(-,root,root) @@ -214,4 +252,19 @@ install -m 644 %{SOURCE10} %{buildroot}%{_sysusersdir}/system-group-wheel.conf %defattr(-,root,root) %{_sysusersdir}/system-group-wheel.conf +%files -n system-user-wwwrun +%defattr(-,root,root) +%dir %attr(0755,wwwrun,wwwrun) %{_localstatedir}/lib/wwwrun +%{_sysusersdir}/system-user-wwwrun.conf + +%files -n system-user-mail +%defattr(-,root,root) +%dir %attr(0770,mail,mail) %{_localstatedir}/spool/clientmqueue +%{_sysusersdir}/system-user-mail.conf + +%files -n system-user-ftp +%defattr(-,root,root) +%dir %attr(0755,root,root) /srv/ftp +%{_sysusersdir}/system-user-ftp.conf + %changelog From dbda3bc769015a94940691633c21490774892eba310e3229d834a8658ea9b8dd Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 16 Mar 2017 14:25:57 +0000 Subject: [PATCH 2/3] Accepting request 480636 from home:kukuk:sysusers - Add group sys to system-group-obsolete - Add systemusers lp and nobody OBS-URL: https://build.opensuse.org/request/show/480636 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=8 --- system-group-obsolete.conf | 3 ++- system-user-lp.conf | 3 +++ system-user-nobody.conf | 5 +++++ system-users.changes | 6 ++++++ system-users.spec | 37 +++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 system-user-lp.conf create mode 100644 system-user-nobody.conf diff --git a/system-group-obsolete.conf b/system-group-obsolete.conf index 97de3bd..9c0f1f9 100644 --- a/system-group-obsolete.conf +++ b/system-group-obsolete.conf @@ -1,6 +1,7 @@ # Type Name ID GECOS [HOME] -g xok - +g sys - g floppy - g modem - g public - g console - +g xok - diff --git a/system-user-lp.conf b/system-user-lp.conf new file mode 100644 index 0000000..3ba35b8 --- /dev/null +++ b/system-user-lp.conf @@ -0,0 +1,3 @@ +# Type Name ID GECOS [HOME] +u lp - "Printing daemon" /var/spool/lpd +g lp - diff --git a/system-user-nobody.conf b/system-user-nobody.conf new file mode 100644 index 0000000..73e06ba --- /dev/null +++ b/system-user-nobody.conf @@ -0,0 +1,5 @@ +# Type Name ID GECOS [HOME] +g nogroup 65533 +g nobody 65534 +u nobody 65534 "nobody" /var/lib/nobody +m nobody nogroup diff --git a/system-users.changes b/system-users.changes index 753bab4..b2e1968 100644 --- a/system-users.changes +++ b/system-users.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 15 22:48:01 CET 2017 - kukuk@suse.de + +- Add group sys to system-group-obsolete +- Add systemusers lp and nobody + ------------------------------------------------------------------- Wed Mar 15 20:47:27 CET 2017 - kukuk@suse.de diff --git a/system-users.spec b/system-users.spec index aa35f97..469bacf 100644 --- a/system-users.spec +++ b/system-users.spec @@ -35,6 +35,8 @@ Source10: system-group-wheel.conf Source11: system-user-wwwrun.conf Source12: system-user-mail.conf Source13: system-user-ftp.conf +Source14: system-user-lp.conf +Source15: system-user-nobody.conf BuildRequires: systemd BuildRequires: sysuser-tools BuildArch: noarch @@ -153,6 +155,23 @@ Group: System/Fhs %description -n system-user-ftp This package provides the system account and group 'ftp'. +%package -n system-user-lp +Summary: System user and group lp +Group: System/Fhs +%{sysusers_requires} + +%description -n system-user-lp +This package provides the system account and group 'lp'. + +%package -n system-user-nobody +Summary: System user and group nobody +Group: System/Fhs +%{sysusers_requires} + +%description -n system-user-nobody +This package provides the system account and group 'nobody'. + + %prep %setup -q -c -T @@ -170,6 +189,8 @@ This package provides the system account and group 'ftp'. %sysusers_generate_pre %{SOURCE11} wwwrun %sysusers_generate_pre %{SOURCE12} mail %sysusers_generate_pre %{SOURCE13} ftp +%sysusers_generate_pre %{SOURCE14} lp +%sysusers_generate_pre %{SOURCE15} nobody %install mkdir -p %{buildroot}%{_sysusersdir} @@ -179,7 +200,9 @@ mkdir -p %{buildroot}%{_localstatedir}/games mkdir -p %{buildroot}%{_localstatedir}/cache/man mkdir -p %{buildroot}%{_localstatedir}/lib/wwwrun mkdir -p %{buildroot}%{_localstatedir}/spool/clientmqueue +mkdir -p %{buildroot}%{_localstatedir}/spool/lpd mkdir -p %{buildroot}/srv/ftp +mkdir -p %{buildroot}%{_localstatedir}/lib/nobody install -m 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/system-user-uucp.conf install -m 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/system-user-games.conf install -m 644 %{SOURCE3} %{buildroot}%{_sysusersdir}/system-user-bin.conf @@ -193,6 +216,8 @@ install -m 644 %{SOURCE10} %{buildroot}%{_sysusersdir}/system-group-wheel.conf install -m 644 %{SOURCE11} %{buildroot}%{_sysusersdir}/system-user-wwwrun.conf install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/system-user-mail.conf install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/system-user-ftp.conf +install -m 644 %{SOURCE14} %{buildroot}%{_sysusersdir}/system-user-lp.conf +install -m 644 %{SOURCE15} %{buildroot}%{_sysusersdir}/system-user-nobody.conf %pre -n system-user-uucp -f uucp.pre %pre -n system-user-games -f games.pre @@ -207,6 +232,8 @@ install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/system-user-ftp.conf %pre -n system-user-wwwrun -f wwwrun.pre %pre -n system-user-mail -f mail.pre %pre -n system-user-ftp -f ftp.pre +%pre -n system-user-lp -f lp.pre +%pre -n system-user-nobody -f nobody.pre %files -n system-user-uucp %defattr(-,root,root) @@ -267,4 +294,14 @@ install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/system-user-ftp.conf %dir %attr(0755,root,root) /srv/ftp %{_sysusersdir}/system-user-ftp.conf +%files -n system-user-lp +%defattr(-,root,root) +%dir %attr(0755,lp,lp) %{_localstatedir}/spool/lpd +%{_sysusersdir}/system-user-lp.conf + +%files -n system-user-nobody +%defattr(-,root,root) +%dir %attr(0755,nobody,root) %{_localstatedir}/lib/nobody +%{_sysusersdir}/system-user-nobody.conf + %changelog From e1f1ee534c43db605ab655e7ebe9d46989f14e84724ccf8da0e4e7a46c65c9e9 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 17 Mar 2017 09:37:11 +0000 Subject: [PATCH 3/3] Accepting request 480796 from home:kukuk:sysusers - Fix group ownership of /var/lib/wwwrun OBS-URL: https://build.opensuse.org/request/show/480796 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=9 --- system-users.changes | 5 +++++ system-users.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/system-users.changes b/system-users.changes index b2e1968..e088b6a 100644 --- a/system-users.changes +++ b/system-users.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 17 10:27:10 CET 2017 - kukuk@suse.de + +- Fix group ownership of /var/lib/wwwrun + ------------------------------------------------------------------- Wed Mar 15 22:48:01 CET 2017 - kukuk@suse.de diff --git a/system-users.spec b/system-users.spec index 469bacf..1357289 100644 --- a/system-users.spec +++ b/system-users.spec @@ -281,7 +281,7 @@ install -m 644 %{SOURCE15} %{buildroot}%{_sysusersdir}/system-user-nobody.conf %files -n system-user-wwwrun %defattr(-,root,root) -%dir %attr(0755,wwwrun,wwwrun) %{_localstatedir}/lib/wwwrun +%dir %attr(0755,wwwrun,root) %{_localstatedir}/lib/wwwrun %{_sysusersdir}/system-user-wwwrun.conf %files -n system-user-mail