Better, from robert@ and pirofti@
This commit is contained in:
parent
6a7b510791
commit
d5392a8408
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.11 2011/07/04 01:35:57 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.12 2011/07/04 05:16:47 ajacoutot Exp $
|
||||
|
||||
COMMENT= D-Bus interface for user account query and manipulation
|
||||
|
||||
DISTNAME= accountsservice-0.6.12
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
REVISION= 9
|
||||
REVISION= 10
|
||||
|
||||
SHARED_LIBS += accountsservice 0.0 # 0.0
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_user_c,v 1.6 2011/07/04 01:35:57 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_user_c,v 1.7 2011/07/04 05:16:47 ajacoutot Exp $
|
||||
--- src/user.c.orig Thu May 19 05:38:50 2011
|
||||
+++ src/user.c Mon Jul 4 03:18:05 2011
|
||||
+++ src/user.c Mon Jul 4 07:13:32 2011
|
||||
@@ -29,7 +29,11 @@
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
@ -145,7 +145,7 @@ $OpenBSD: patch-src_user_c,v 1.6 2011/07/04 01:35:57 ajacoutot Exp $
|
||||
new_name, NULL);
|
||||
|
||||
g_rename (old_filename, new_filename);
|
||||
@@ -1550,16 +1591,31 @@ user_change_locked_authorized_cb (Daemon
|
||||
@@ -1550,16 +1591,33 @@ user_change_locked_authorized_cb (Daemon
|
||||
{
|
||||
gboolean locked = GPOINTER_TO_INT (data);
|
||||
GError *error;
|
||||
@ -154,7 +154,9 @@ $OpenBSD: patch-src_user_c,v 1.6 2011/07/04 01:35:57 ajacoutot Exp $
|
||||
+ gchar *argv[5];
|
||||
+ gchar *lockshell, *nolockshell;
|
||||
+ lockshell = g_strjoin (NULL, user->shell, "-", NULL);
|
||||
+ nolockshell = g_strndup (user->shell, sizeof(user->shell));
|
||||
+ nolockshell = g_strdup(user->shell);
|
||||
+ if (nolockshell[strlen(nolockshell) - 1] == '-')
|
||||
+ nolockshell[strlen(nolockshell)-1] = '\0';
|
||||
+#else
|
||||
gchar *argv[4];
|
||||
+#endif
|
||||
@ -177,7 +179,7 @@ $OpenBSD: patch-src_user_c,v 1.6 2011/07/04 01:35:57 ajacoutot Exp $
|
||||
|
||||
error = NULL;
|
||||
if (!spawn_with_login_uid (context, argv, &error)) {
|
||||
@@ -1568,6 +1624,10 @@ user_change_locked_authorized_cb (Daemon
|
||||
@@ -1568,6 +1626,10 @@ user_change_locked_authorized_cb (Daemon
|
||||
return;
|
||||
}
|
||||
|
||||
@ -188,7 +190,7 @@ $OpenBSD: patch-src_user_c,v 1.6 2011/07/04 01:35:57 ajacoutot Exp $
|
||||
user->locked = locked;
|
||||
|
||||
g_signal_emit (user, signals[CHANGED], 0);
|
||||
@@ -1634,7 +1694,11 @@ user_change_account_type_authorized_cb (Daemon
|
||||
@@ -1634,7 +1696,11 @@ user_change_account_type_authorized_cb (Daemon
|
||||
}
|
||||
switch (account_type) {
|
||||
case ACCOUNT_TYPE_ADMINISTRATOR:
|
||||
@ -200,7 +202,7 @@ $OpenBSD: patch-src_user_c,v 1.6 2011/07/04 01:35:57 ajacoutot Exp $
|
||||
break;
|
||||
default:
|
||||
/* remove excess comma */
|
||||
@@ -1753,9 +1817,16 @@ user_change_password_mode_authorized_cb (Daemon
|
||||
@@ -1753,9 +1819,16 @@ user_change_password_mode_authorized_cb (Daemon
|
||||
}
|
||||
else if (user->locked) {
|
||||
argv[0] = "/usr/sbin/usermod";
|
||||
|
Loading…
Reference in New Issue
Block a user