From 039bc443373a1f30e632a0eeefc46f2d9f65296b Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 12 Mar 2012 19:39:23 +0100 Subject: [PATCH] Fix disabling passwords passwd requires root when "-d" is passed. https://bugs.freedesktop.org/show_bug.cgi?id=47247 --- src/user.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/user.c b/src/user.c index 6cc54e1..9b2881a 100644 --- a/src/user.c +++ b/src/user.c @@ -1357,7 +1357,8 @@ user_change_password_mode_authorized_cb (Daemon *daemon, argv[4] = NULL; error = NULL; - if (!spawn_with_login_uid (context, argv, &error)) { + /* the -d option requires root */ + if (!spawn_with_uid (NULL, argv, &error)) { throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message); g_error_free (error); return; -- 1.7.7.6