Update to accountsservice-0.6.24.
This commit is contained in:
parent
e84102fa10
commit
3e02a823b8
@ -1,12 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.28 2012/07/08 16:35:19 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.29 2012/09/11 14:42:37 ajacoutot Exp $
|
||||
|
||||
COMMENT= D-Bus interface for user account query and manipulation
|
||||
|
||||
DISTNAME= accountsservice-0.6.22
|
||||
DISTNAME= accountsservice-0.6.24
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
|
||||
REVISION= 0
|
||||
|
||||
SHARED_LIBS += accountsservice 0.0 # 0.0
|
||||
|
||||
CATEGORIES= sysutils
|
||||
@ -49,11 +47,4 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
|
||||
|
||||
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/accountsservice
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/src/daemon.c
|
||||
|
||||
# XXX
|
||||
post-configure:
|
||||
echo '#undef WITH_SYSTEMD' >> ${WRKBUILD}/config.h
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,2 @@
|
||||
MD5 (accountsservice-0.6.22.tar.xz) = c+wOaJqDopcDE89yBPiGIg==
|
||||
RMD160 (accountsservice-0.6.22.tar.xz) = qWXpSTsAWtiHojbaQbqZJzZ+bJk=
|
||||
SHA1 (accountsservice-0.6.22.tar.xz) = Mjj3NKJP81iXR9JjwVCdr61dnyw=
|
||||
SHA256 (accountsservice-0.6.22.tar.xz) = hR4Fqlk82OPtXGNaf+4//A9BjT2y8oxevWt1AylOO90=
|
||||
SIZE (accountsservice-0.6.22.tar.xz) = 331028
|
||||
SHA256 (accountsservice-0.6.24.tar.xz) = 8sCIbF1tgEU+69SpHmCBIxzebMQ21VuUJdLMAzKoViM=
|
||||
SIZE (accountsservice-0.6.24.tar.xz) = 332928
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-src_Makefile_in,v 1.4 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
--- src/Makefile.in.orig Thu Jun 28 17:33:09 2012
|
||||
+++ src/Makefile.in Wed Jul 4 10:39:31 2012
|
||||
@@ -333,8 +333,8 @@ SUBDIRS = . libaccountsservice
|
||||
$OpenBSD: patch-src_Makefile_in,v 1.5 2012/09/11 14:42:37 ajacoutot Exp $
|
||||
--- src/Makefile.in.orig Tue Aug 21 04:08:47 2012
|
||||
+++ src/Makefile.in Tue Sep 11 14:10:16 2012
|
||||
@@ -342,8 +342,8 @@ SUBDIRS = . libaccountsservice
|
||||
INCLUDES = \
|
||||
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
|
||||
-DDATADIR=\""$(datadir)"\" \
|
||||
@ -12,7 +12,7 @@ $OpenBSD: patch-src_Makefile_in,v 1.4 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
$(DBUS_GLIB_CFLAGS) \
|
||||
$(GIO_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
@@ -363,7 +363,8 @@ accounts_daemon_LDADD = \
|
||||
@@ -372,7 +372,8 @@ accounts_daemon_LDADD = \
|
||||
$(DBUS_GLIB_LIBS) \
|
||||
$(GIO_LIBS) \
|
||||
$(GLIB_LIBS) \
|
||||
|
@ -1,16 +1,18 @@
|
||||
$OpenBSD: patch-src_daemon_c,v 1.18 2012/07/08 16:35:19 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_daemon_c,v 1.19 2012/09/11 14:42:37 ajacoutot Exp $
|
||||
|
||||
In default_excludes[], add any ports and system users that has a login
|
||||
shell.
|
||||
|
||||
OpenBSD does not have any function to parse a specified passwd(5) file.
|
||||
|
||||
Revert the following commit:
|
||||
This reverts commit dfa1a6239b01c823ce0fec781c6c9541c988f56e.
|
||||
The commit is wrong, since we're only interested in local users.
|
||||
http://bugs.freedesktop.org/show_bug.cgi?id=41747
|
||||
(XXX we need a way to only get local users)
|
||||
|
||||
--- src/daemon.c.orig Thu Jun 28 17:24:55 2012
|
||||
+++ src/daemon.c Sun Jul 8 18:33:40 2012
|
||||
--- src/daemon.c.orig Thu Aug 16 21:03:51 2012
|
||||
+++ src/daemon.c Tue Sep 11 15:11:35 2012
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <utmpx.h>
|
||||
#endif
|
||||
@ -40,65 +42,50 @@ http://bugs.freedesktop.org/show_bug.cgi?id=41747
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -300,22 +315,32 @@ reload_passwd (Daemon *daemon)
|
||||
GSList *old_users;
|
||||
GSList *new_users;
|
||||
GSList *list;
|
||||
@@ -291,8 +306,11 @@ entry_generator_fgetpwent (GHashTable *users,
|
||||
gpointer *state)
|
||||
{
|
||||
struct passwd *pwent;
|
||||
+#ifdef HAVE_FGETPWENT
|
||||
FILE *fp;
|
||||
+#endif
|
||||
User *user = NULL;
|
||||
|
||||
old_users = NULL;
|
||||
new_users = NULL;
|
||||
|
||||
+#ifdef HAVE_FGETPWENT
|
||||
errno = 0;
|
||||
fp = fopen (PATH_PASSWD, "r");
|
||||
if (fp == NULL) {
|
||||
g_warning ("Unable to open %s: %s", PATH_PASSWD, g_strerror (errno));
|
||||
goto out;
|
||||
}
|
||||
/* First iteration */
|
||||
if (*state == NULL) {
|
||||
*state = fp = fopen (PATH_PASSWD, "r");
|
||||
@@ -305,13 +323,18 @@ entry_generator_fgetpwent (GHashTable *users,
|
||||
/* Every iteration */
|
||||
fp = *state;
|
||||
pwent = fgetpwent (fp);
|
||||
+#else
|
||||
+ setpwent();
|
||||
+ pwent = getpwent ();
|
||||
+#endif
|
||||
g_hash_table_foreach (daemon->priv->users, listify_hash_values_hfunc, &old_users);
|
||||
g_slist_foreach (old_users, (GFunc) g_object_ref, NULL);
|
||||
|
||||
+#ifdef HAVE_FGETPWENT
|
||||
while ((pwent = fgetpwent (fp)) != NULL) {
|
||||
+#else
|
||||
+ while ((pwent = getpwent ()) != NULL) {
|
||||
+#endif
|
||||
/* Skip system users... */
|
||||
if (daemon_local_user_is_excluded (daemon, pwent->pw_name, pwent->pw_shell)) {
|
||||
g_debug ("skipping user: %s", pwent->pw_name);
|
||||
@@ -365,10 +390,12 @@ reload_passwd (Daemon *daemon)
|
||||
}
|
||||
if (pwent != NULL) {
|
||||
return pwent;
|
||||
}
|
||||
|
||||
/* Last iteration */
|
||||
+#ifdef HAVE_FGETPWENT
|
||||
out:
|
||||
/* Cleanup */
|
||||
|
||||
fclose (fp);
|
||||
*state = NULL;
|
||||
+#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_slist_foreach (new_users, (GFunc) g_object_thaw_notify, NULL);
|
||||
g_slist_foreach (new_users, (GFunc) g_object_unref, NULL);
|
||||
@@ -922,7 +949,11 @@ daemon_create_user_authorized_cb (Daemon
|
||||
@@ -1020,7 +1043,11 @@ daemon_create_user_authorized_cb (Daemon
|
||||
CreateUserData *cd = data;
|
||||
User *user;
|
||||
GError *error;
|
||||
+#ifndef __OpenBSD__
|
||||
const gchar *argv[9];
|
||||
+#else
|
||||
+ const gchar *argv[13];
|
||||
+ const gchar *argv[13];
|
||||
+#endif
|
||||
|
||||
if (getpwnam (cd->user_name) != NULL) {
|
||||
throw_error (context, ERROR_USER_EXISTS, "A user with name '%s' already exists", cd->user_name);
|
||||
@@ -939,14 +970,31 @@ daemon_create_user_authorized_cb (Daemon
|
||||
@@ -1037,14 +1064,31 @@ daemon_create_user_authorized_cb (Daemon
|
||||
if (cd->account_type == ACCOUNT_TYPE_ADMINISTRATOR) {
|
||||
argv[4] = "-G";
|
||||
argv[5] = "wheel";
|
||||
@ -130,7 +117,7 @@ http://bugs.freedesktop.org/show_bug.cgi?id=41747
|
||||
}
|
||||
else {
|
||||
throw_error (context, ERROR_FAILED, "Don't know how to add user of type %d", cd->account_type);
|
||||
@@ -1018,15 +1066,49 @@ daemon_delete_user_authorized_cb (Daemon
|
||||
@@ -1240,6 +1284,34 @@ daemon_delete_user_authorized_cb (Daemon
|
||||
return;
|
||||
}
|
||||
|
||||
@ -142,7 +129,7 @@ http://bugs.freedesktop.org/show_bug.cgi?id=41747
|
||||
+#ifdef __OpenBSD__
|
||||
+ struct group *grp;
|
||||
+ GError *grperror;
|
||||
+ const gchar *grpargv[2];
|
||||
+ const gchar *grpargv[3];
|
||||
+
|
||||
+ grp = getgrnam (pwent->pw_name);
|
||||
+
|
||||
@ -151,6 +138,7 @@ http://bugs.freedesktop.org/show_bug.cgi?id=41747
|
||||
+
|
||||
+ grpargv[0] = "/usr/sbin/groupdel";
|
||||
+ grpargv[1] = pwent->pw_name;
|
||||
+ grpargv[2] = NULL;
|
||||
+
|
||||
+ grperror = NULL;
|
||||
+ if (!spawn_with_login_uid (context, grpargv, &grperror)) {
|
||||
@ -163,6 +151,9 @@ http://bugs.freedesktop.org/show_bug.cgi?id=41747
|
||||
+
|
||||
sys_log (context, "delete user '%s' (%d)", pwent->pw_name, ud->uid);
|
||||
|
||||
filename = g_build_filename (USERDIR, pwent->pw_name, NULL);
|
||||
@@ -1252,11 +1324,18 @@ daemon_delete_user_authorized_cb (Daemon
|
||||
|
||||
argv[0] = "/usr/sbin/userdel";
|
||||
if (ud->remove_files) {
|
||||
+#ifdef __OpenBSD__
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-src_libaccountsservice_Makefile_in,v 1.5 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_libaccountsservice_Makefile_in,v 1.6 2012/09/11 14:42:37 ajacoutot Exp $
|
||||
|
||||
OpenBSD does NOT require -lcrypt, DES encryption is part of the standard libc.
|
||||
|
||||
--- src/libaccountsservice/Makefile.in.orig Thu Jun 28 17:33:09 2012
|
||||
+++ src/libaccountsservice/Makefile.in Wed Jul 4 10:38:15 2012
|
||||
@@ -382,7 +382,6 @@ libaccountsservice_la_LDFLAGS = \
|
||||
--- src/libaccountsservice/Makefile.in.orig Tue Aug 21 04:08:48 2012
|
||||
+++ src/libaccountsservice/Makefile.in Tue Sep 11 14:10:16 2012
|
||||
@@ -390,7 +390,6 @@ libaccountsservice_la_LDFLAGS = \
|
||||
|
||||
libaccountsservice_la_LIBADD = \
|
||||
$(LIBACCOUNTSSERVICE_LIBS) \
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
--- src/user.c.orig Thu Jun 28 17:28:15 2012
|
||||
+++ src/user.c Thu Jul 5 08:58:01 2012
|
||||
@@ -110,7 +110,12 @@ account_type_from_pwent (struct passwd *pwent)
|
||||
$OpenBSD: patch-src_user_c,v 1.14 2012/09/11 14:42:37 ajacoutot Exp $
|
||||
--- src/user.c.orig Thu Aug 16 21:03:51 2012
|
||||
+++ src/user.c Tue Sep 11 14:10:16 2012
|
||||
@@ -112,7 +112,12 @@ account_type_from_pwent (struct passwd *pwent)
|
||||
{
|
||||
struct group *grp;
|
||||
gid_t wheel;
|
||||
@ -14,7 +14,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
gint ngroups;
|
||||
gint i;
|
||||
|
||||
@@ -126,16 +131,28 @@ account_type_from_pwent (struct passwd *pwent)
|
||||
@@ -128,16 +133,28 @@ account_type_from_pwent (struct passwd *pwent)
|
||||
}
|
||||
wheel = grp->gr_gid;
|
||||
|
||||
@ -43,7 +43,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
|
||||
return ACCOUNT_TYPE_STANDARD;
|
||||
}
|
||||
@@ -245,12 +262,21 @@ user_local_update_from_pwent (User *user,
|
||||
@@ -247,12 +264,21 @@ user_update_from_pwent (User *user,
|
||||
passwd = spent->sp_pwdp;
|
||||
#endif
|
||||
|
||||
@ -65,7 +65,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
|
||||
if (user->locked != locked) {
|
||||
user->locked = locked;
|
||||
@@ -374,7 +400,7 @@ save_extra_data (User *user)
|
||||
@@ -386,7 +412,7 @@ save_extra_data (User *user)
|
||||
error = NULL;
|
||||
data = g_key_file_to_data (keyfile, NULL, &error);
|
||||
if (error == NULL) {
|
||||
@ -74,7 +74,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
user->user_name,
|
||||
NULL);
|
||||
g_file_set_contents (filename, data, -1, &error);
|
||||
@@ -395,9 +421,10 @@ move_extra_data (const gchar *old_name,
|
||||
@@ -407,9 +433,10 @@ move_extra_data (const gchar *old_name,
|
||||
gchar *old_filename;
|
||||
gchar *new_filename;
|
||||
|
||||
@ -87,7 +87,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
new_name, NULL);
|
||||
|
||||
g_rename (old_filename, new_filename);
|
||||
@@ -1199,17 +1226,34 @@ user_change_locked_authorized_cb (Daemon
|
||||
@@ -1218,17 +1245,34 @@ user_change_locked_authorized_cb (Daemon
|
||||
{
|
||||
gboolean locked = GPOINTER_TO_INT (data);
|
||||
GError *error;
|
||||
@ -122,7 +122,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
|
||||
error = NULL;
|
||||
if (!spawn_with_login_uid (context, argv, &error)) {
|
||||
@@ -1218,6 +1262,11 @@ user_change_locked_authorized_cb (Daemon
|
||||
@@ -1237,6 +1281,11 @@ user_change_locked_authorized_cb (Daemon
|
||||
return;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
user->locked = locked;
|
||||
|
||||
accounts_user_emit_changed (ACCOUNTS_USER (user));
|
||||
@@ -1255,13 +1304,23 @@ user_change_account_type_authorized_cb (Daemon
|
||||
@@ -1274,13 +1323,23 @@ user_change_account_type_authorized_cb (Daemon
|
||||
{
|
||||
AccountType account_type = GPOINTER_TO_INT (data);
|
||||
GError *error;
|
||||
@ -158,7 +158,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
|
||||
if (user->account_type != account_type) {
|
||||
sys_log (context,
|
||||
@@ -1275,33 +1334,66 @@ user_change_account_type_authorized_cb (Daemon
|
||||
@@ -1294,33 +1353,66 @@ user_change_account_type_authorized_cb (Daemon
|
||||
}
|
||||
wheel = grp->gr_gid;
|
||||
|
||||
@ -225,7 +225,7 @@ $OpenBSD: patch-src_user_c,v 1.13 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
|
||||
g_string_free (str, FALSE);
|
||||
|
||||
@@ -1410,10 +1502,18 @@ user_change_password_mode_authorized_cb (Daemon
|
||||
@@ -1429,10 +1521,18 @@ user_change_password_mode_authorized_cb (Daemon
|
||||
}
|
||||
else if (user->locked) {
|
||||
argv[0] = "/usr/sbin/usermod";
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_util_c,v 1.8 2012/07/05 07:18:59 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_util_c,v 1.9 2012/09/11 14:42:37 ajacoutot Exp $
|
||||
|
||||
We don't use /proc on OpenBSD.
|
||||
|
||||
@ -30,7 +30,7 @@ We don't use /proc on OpenBSD.
|
||||
g_free (filename);
|
||||
g_free (contents);
|
||||
+#else /* OpenBSD */
|
||||
+ gchar *ret;
|
||||
+ gchar *ret = NULL;
|
||||
+ int nproc;
|
||||
+ struct kinfo_proc *kp;
|
||||
+ char **pargv;
|
||||
|
Loading…
Reference in New Issue
Block a user