[accountsservice/f20] Consistently call userdel -f

Matthias Clasen mclasen at fedoraproject.org
Fri Jan 10 18:11:45 UTC 2014


commit 3a7a6b05ded2d6ea9bb3e0c7cd3838fb6a8061ea
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Fri Jan 10 13:05:20 2014 -0500

    Consistently call userdel -f

 accountsservice.spec |    7 ++++++-
 userdel-f.patch      |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/accountsservice.spec b/accountsservice.spec
index a74c695..38a1f65 100644
--- a/accountsservice.spec
+++ b/accountsservice.spec
@@ -2,7 +2,7 @@
 
 Name:           accountsservice
 Version:        0.6.35
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        D-Bus interfaces for querying and manipulating user account information
 
 Group:          System Environment/Daemons
@@ -28,6 +28,7 @@ Requires(preun): systemd-units
 Requires(postun): systemd-units
 
 Patch0: fix-user-classification.patch
+Patch1: userdel-f.patch
 
 %package libs
 Summary: Client-side library to talk to accountsservice
@@ -59,6 +60,7 @@ of these interfaces, based on the useradd, usermod and userdel commands.
 %prep
 %setup -q
 %patch0 -p1 -b .fix-user-classification
+%patch1 -p1 -b .userdel-f
 
 %build
 %configure --enable-user-heuristics
@@ -112,6 +114,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a
 %{_datadir}/gtk-doc/html/libaccountsservice/*
 
 %changelog
+* Fri Jan 10 2014 Matthias Clasen <mclasen at redhat.com> - 0.6.35-4
+- Consistently call userdel with -f
+
 * Wed Nov 20 2013 Ray Strode <rstrode at redhat.com> 0.6.35-3
 - Only treat users < 1000 as system users
 - only use user heuristics on the range 500-1000
diff --git a/userdel-f.patch b/userdel-f.patch
new file mode 100644
index 0000000..003d69e
--- /dev/null
+++ b/userdel-f.patch
@@ -0,0 +1,32 @@
+From 77e2d73723aaef376d97597a61328619b8a204c3 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Fri, 10 Jan 2014 12:38:55 -0500
+Subject: [PATCH] Call userdel consistently
+
+When deleting the users files, we use -f, otherwise we don't. This
+leads to inconsistent behaviour. Always pass -f.
+---
+ src/daemon.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/daemon.c b/src/daemon.c
+index b2720f4..cb36f01 100644
+--- a/src/daemon.c
++++ b/src/daemon.c
+@@ -1289,9 +1289,10 @@ daemon_delete_user_authorized_cb (Daemon                *daemon,
+                 argv[5] = NULL;
+         }
+         else {
+-                argv[1] = "--";
+-                argv[2] = pwent->pw_name;
+-                argv[3] = NULL;
++                argv[1] = "-f";
++                argv[2] = "--";
++                argv[3] = pwent->pw_name;
++                argv[4] = NULL;
+         }
+ 
+         error = NULL;
+-- 
+1.8.4.2
+


More information about the scm-commits mailing list