[accountsservice] Consistently call userdel -f

Matthias Clasen mclasen at fedoraproject.org
Fri Jan 10 18:05:20 UTC 2014


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

    Consistently call userdel -f

 accountsservice.spec |    9 ++++++++-
 userdel-f.patch      |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/accountsservice.spec b/accountsservice.spec
index 660cc05..f1e5a44 100644
--- a/accountsservice.spec
+++ b/accountsservice.spec
@@ -2,7 +2,7 @@
 
 Name:           accountsservice
 Version:        0.6.35
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        D-Bus interfaces for querying and manipulating user account information
 
 Group:          System Environment/Daemons
@@ -11,6 +11,9 @@ URL:            http://www.fedoraproject.org/wiki/Features/UserAccountDialog
 #VCS: git:git://git.freedesktop.org/accountsservice
 Source0:        http://www.freedesktop.org/software/accountsservice/accountsservice-%{version}.tar.xz
 
+# upstream fix
+Patch0: userdel-f.patch
+
 BuildRequires:  glib2-devel
 BuildRequires:  dbus-glib-devel
 BuildRequires:  polkit-devel
@@ -55,6 +58,7 @@ of these interfaces, based on the useradd, usermod and userdel commands.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure
@@ -108,6 +112,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-2
+- Consistently call userdel with -f
+
 * Tue Oct 22 2013 Matthias Clasen <mclasen at redhat.com> - 0.6.35-1
 - Update to 0.6.35
 
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