Commit cf4c30e0 authored by Olivier Duchateau's avatar Olivier Duchateau
Browse files

Update to 0.6.46

parent af75798a
......@@ -2,7 +2,7 @@
# $FreeBSD: head/sysutils/accountsservice/Makefile 517057 2019-11-08 13:11:05Z tobik $
PORTNAME= accountsservice
PORTVERSION= 0.6.45
PORTVERSION= 0.6.46
CATEGORIES= sysutils devel
MASTER_SITES= http://www.freedesktop.org/software/${PORTNAME}/
......@@ -21,8 +21,10 @@ CPE_VENDOR= ray_stode
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
CONFIGURE_ARGS= --disable-systemd \
--disable-elogind \
--without-html-dir \
--without-systemdsystemunitdir \
--with-gdmconffile=${LOCALBASE}/etc/gdm/custom.conf \
--localstatedir=/var/
INSTALL_TARGET= install-strip
......@@ -33,8 +35,6 @@ CONFIGURE_ENV+= ac_cv_file__var_log_utx_log=yes
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/etc/gdm/custom.conf|${LOCALBASE}/etc/gdm/custom.conf|g' \
${WRKSRC}/src/daemon.c
@${REINPLACE_CMD} -e 's|/lib/AccountsService|/db/AccountsService|g' \
${WRKSRC}/src/Makefile.in
......
TIMESTAMP = 1600426704
SHA256 (accountsservice-0.6.45.tar.xz) = fb0fc293aa75d59f5ef5db719d37a21831c4dd74a97526ee7e51ce936311ef26
SIZE (accountsservice-0.6.45.tar.xz) = 382740
TIMESTAMP = 1600426925
SHA256 (accountsservice-0.6.46.tar.xz) = 1865b98b831ce7e8656cabee213f9a6803cf45032594099410900b0557b3ad25
SIZE (accountsservice-0.6.46.tar.xz) = 385144
--- src/daemon.c.orig 2017-03-27 18:05:12 UTC
--- src/daemon.c.orig 2018-04-04 13:59:42 UTC
+++ src/daemon.c
@@ -79,7 +79,11 @@ struct DaemonPrivate {
GHashTable *extension_ifaces;
......@@ -12,8 +12,8 @@
static void daemon_accounts_accounts_iface_init (AccountsAccountsIface *iface);
@@ -141,17 +145,25 @@ error_get_type (void)
#endif
@@ -156,17 +160,25 @@ remove_cache_files (const gchar *user_name)
}
static struct passwd *
+#ifdef HAVE_SHADOW_H
......@@ -38,7 +38,7 @@
struct {
FILE *fp;
@@ -162,6 +174,7 @@ entry_generator_fgetpwent (Daemon *daemon,
@@ -177,6 +189,7 @@ entry_generator_fgetpwent (Daemon *daemon,
if (*state == NULL) {
GHashTable *shadow_users = NULL;
FILE *fp;
......@@ -46,7 +46,7 @@
struct spwd *shadow_entry;
fp = fopen (PATH_SHADOW, "r");
@@ -195,6 +208,7 @@ entry_generator_fgetpwent (Daemon *daemon,
@@ -210,6 +223,7 @@ entry_generator_fgetpwent (Daemon *daemon,
g_clear_pointer (&shadow_users, g_hash_table_unref);
return NULL;
}
......@@ -54,7 +54,7 @@
fp = fopen (PATH_PASSWD, "r");
if (fp == NULL) {
@@ -216,12 +230,17 @@ entry_generator_fgetpwent (Daemon *daemon,
@@ -231,12 +245,17 @@ entry_generator_fgetpwent (Daemon *daemon,
if (g_hash_table_size (users) < MAX_LOCAL_USERS) {
pwent = fgetpwent (generator_state->fp);
if (pwent != NULL) {
......@@ -72,7 +72,7 @@
}
}
@@ -235,10 +254,16 @@ entry_generator_fgetpwent (Daemon *daemon,
@@ -250,10 +269,16 @@ entry_generator_fgetpwent (Daemon *daemon,
}
static struct passwd *
......@@ -88,18 +88,18 @@
+#endif
{
struct passwd *pwent;
const gchar *name;
@@ -283,7 +308,9 @@ entry_generator_cachedir (Daemon *daemon,
if (pwent == NULL) {
g_debug ("user '%s' in cache dir but not present on system", name);
} else {
g_autoptr(GError) error = NULL;
@@ -296,7 +321,9 @@ entry_generator_cachedir (Daemon *daemon,
errno = 0;
pwent = getpwnam (name);
if (pwent != NULL) {
+#ifdef HAVE_SHADOW_H
*shadow_entry = getspnam (pwent->pw_name);
+#endif
return pwent;
}
@@ -309,10 +336,16 @@ entry_generator_cachedir (Daemon *daemon,
} else if (errno == 0) {
@@ -330,10 +357,16 @@ entry_generator_cachedir (Daemon *daemon,
}
static struct passwd *
......@@ -116,7 +116,7 @@
{
struct passwd *pwent;
GList *node;
@@ -339,7 +372,9 @@ entry_generator_requested_users (Daemon *daemon,
@@ -360,7 +393,9 @@ entry_generator_requested_users (Daemon *daemon,
if (pwent == NULL) {
g_debug ("user '%s' requested previously but not present on system", name);
} else {
......@@ -126,7 +126,7 @@
return pwent;
}
@@ -361,19 +396,29 @@ load_entries (Daemon *daemon,
@@ -382,19 +417,29 @@ load_entries (Daemon *daemon,
{
gpointer generator_state = NULL;
struct passwd *pwent;
......@@ -149,26 +149,26 @@
/* Skip system users... */
+#ifdef HAVE_SHADOW_H
if (!allow_system_users && !user_classify_is_human (pwent->pw_uid, pwent->pw_name, pwent->pw_shell, spent? spent->sp_pwdp : NULL)) {
if (!explicitly_requested && !user_classify_is_human (pwent->pw_uid, pwent->pw_name, pwent->pw_shell, spent? spent->sp_pwdp : NULL)) {
+#else
+ if (!allow_system_users && !user_classify_is_human (pwent->pw_uid, pwent->pw_name, pwent->pw_shell, NULL)) {
+ if (!explicitly_requested && !user_classify_is_human (pwent->pw_uid, pwent->pw_name, pwent->pw_shell, NULL)) {
+#endif
g_debug ("skipping user: %s", pwent->pw_name);
continue;
}
@@ -392,7 +437,11 @@ load_entries (Daemon *daemon,
@@ -416,7 +461,11 @@ load_entries (Daemon *daemon,
/* freeze & update users not already in the new list */
g_object_freeze_notify (G_OBJECT (user));
/* freeze & update users not already in the new list */
g_object_freeze_notify (G_OBJECT (user));
+#ifdef HAVE_SHADOW_H
user_update_from_pwent (user, pwent, spent);
user_update_from_pwent (user, pwent, spent);
+#else
+ user_update_from_pwent (user, pwent);
+ user_update_from_pwent (user, pwent);
+#endif
g_hash_table_insert (users, g_strdup (user_get_user_name (user)), user);
g_debug ("loaded user: %s", user_get_user_name (user));
@@ -769,14 +818,23 @@ throw_error (GDBusMethodInvocation *context,
g_hash_table_insert (users, g_strdup (user_get_user_name (user)), user);
g_debug ("loaded user: %s", user_get_user_name (user));
@@ -807,14 +856,23 @@ throw_error (GDBusMethodInvocation *context,
}
static User *
......@@ -192,7 +192,7 @@
user_register (user);
g_hash_table_insert (daemon->priv->users,
@@ -804,9 +862,13 @@ daemon_local_find_user_by_id (Daemon *daemon,
@@ -842,9 +900,13 @@ daemon_local_find_user_by_id (Daemon *daemon,
user = g_hash_table_lookup (daemon->priv->users, pwent->pw_name);
if (user == NULL) {
......@@ -206,7 +206,7 @@
daemon->priv->explicitly_requested_users = g_list_append (daemon->priv->explicitly_requested_users,
g_strdup (pwent->pw_name));
@@ -831,9 +893,13 @@ daemon_local_find_user_by_name (Daemon *daemon,
@@ -869,9 +931,13 @@ daemon_local_find_user_by_name (Daemon *daemon,
user = g_hash_table_lookup (daemon->priv->users, pwent->pw_name);
if (user == NULL) {
......@@ -220,7 +220,7 @@
daemon->priv->explicitly_requested_users = g_list_append (daemon->priv->explicitly_requested_users,
g_strdup (pwent->pw_name));
@@ -1032,20 +1098,18 @@ daemon_create_user_authorized_cb (Daemon
@@ -1070,10 +1136,12 @@ daemon_create_user_authorized_cb (Daemon
sys_log (context, "create user '%s'", cd->user_name);
......@@ -235,12 +235,18 @@
+ argv[4] = "-c";
+ argv[5] = cd->real_name;
if (cd->account_type == ACCOUNT_TYPE_ADMINISTRATOR) {
g_autofree gchar *admin_groups = NULL;
@@ -1082,15 +1150,11 @@ daemon_create_user_authorized_cb (Daemon
admin_groups = g_strconcat (admin_groups, ",",
EXTRA_ADMIN_GROUPS, NULL);
- argv[4] = "-G";
- argv[5] = ADMIN_GROUP;
- argv[5] = admin_groups;
- argv[6] = "--";
- argv[7] = cd->user_name;
+ argv[6] = "-G";
+ argv[7] = ADMIN_GROUP;
+ argv[7] = admin_groups;
argv[8] = NULL;
}
else if (cd->account_type == ACCOUNT_TYPE_STANDARD) {
......@@ -249,9 +255,18 @@
argv[6] = NULL;
}
else {
@@ -1251,19 +1315,17 @@ daemon_delete_user_authorized_cb (Daemon
g_remove (filename);
g_free (filename);
@@ -1255,7 +1319,7 @@ daemon_delete_user_authorized_cb (Daemon
DeleteUserData *ud = data;
g_autoptr(GError) error = NULL;
struct passwd *pwent;
- const gchar *argv[6];
+ const gchar *argv[5];
User *user;
pwent = getpwuid (ud->uid);
@@ -1279,19 +1343,17 @@ daemon_delete_user_authorized_cb (Daemon
remove_cache_files (pwent->pw_name);
- argv[0] = "/usr/sbin/userdel";
+ argv[0] = "/usr/sbin/pw";
......@@ -276,4 +291,4 @@
+ argv[3] = NULL;
}
error = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
--- src/libaccountsservice/act-user.c.orig 2018-04-04 13:59:42 UTC
+++ src/libaccountsservice/act-user.c
@@ -26,8 +26,6 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <crypt.h>
-
#include <glib.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
--- src/user.c.orig 2017-03-27 17:53:21 UTC
--- src/user.c.orig 2018-04-04 13:59:43 UTC
+++ src/user.c
@@ -151,9 +151,14 @@ account_type_from_pwent (struct passwd *pwent)
@@ -153,9 +153,14 @@ account_type_from_pwent (struct passwd *pwent)
}
void
......@@ -13,9 +13,9 @@
+ struct passwd *pwent)
+#endif
{
gchar *real_name;
g_autofree gchar *real_name = NULL;
gboolean changed;
@@ -253,8 +258,10 @@ user_update_from_pwent (User *user,
@@ -251,8 +256,10 @@ user_update_from_pwent (User *user,
}
passwd = NULL;
......@@ -26,7 +26,7 @@
if (passwd && passwd[0] == '!') {
locked = TRUE;
@@ -276,6 +283,7 @@ user_update_from_pwent (User *user,
@@ -274,6 +281,7 @@ user_update_from_pwent (User *user,
mode = PASSWORD_MODE_NONE;
}
......@@ -34,9 +34,9 @@
if (spent) {
if (spent->sp_lstchg == 0) {
mode = PASSWORD_MODE_SET_AT_LOGIN;
@@ -288,6 +296,9 @@ user_update_from_pwent (User *user,
user->days_to_warn = spent->sp_warn;
@@ -287,6 +295,9 @@ user_update_from_pwent (User *user,
user->days_after_expiration_until_lock = spent->sp_inact;
user->account_expiration_policy_known = TRUE;
}
+#else
+ user->expiration_time = pwent->pw_expire;
......@@ -44,7 +44,7 @@
if (user->password_mode != mode) {
user->password_mode = mode;
@@ -871,11 +882,11 @@ user_change_real_name_authorized_cb (Daemon
@@ -864,11 +875,11 @@ user_change_real_name_authorized_cb (Daemon
"change real name of user '%s' (%d) to '%s'",
user->user_name, user->uid, name);
......@@ -60,8 +60,8 @@
+ argv[4] = name;
argv[5] = NULL;
error = NULL;
@@ -945,11 +956,11 @@ user_change_user_name_authorized_cb (Daemon
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -936,11 +947,11 @@ user_change_user_name_authorized_cb (Daemon
"change name of user '%s' (%d) to '%s'",
old_name, user->uid, name);
......@@ -77,11 +77,11 @@
+ argv[4] = name;
argv[5] = NULL;
error = NULL;
@@ -1268,20 +1279,19 @@ user_change_home_dir_authorized_cb (Daemon
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1262,20 +1273,19 @@ user_change_home_dir_authorized_cb (Daemon
{
gchar *home_dir = data;
GError *error;
g_autoptr(GError) error = NULL;
- const gchar *argv[7];
+ const gchar *argv[6];
......@@ -104,9 +104,9 @@
+ argv[4] = user->user_name;
+ argv[5] = NULL;
error = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1337,11 +1347,11 @@ user_change_shell_authorized_cb (Daemon
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1329,11 +1339,11 @@ user_change_shell_authorized_cb (Daemon
"change shell of user '%s' (%d) to '%s'",
user->user_name, user->uid, shell);
......@@ -122,11 +122,11 @@
+ argv[4] = shell;
argv[5] = NULL;
error = NULL;
@@ -1591,17 +1601,16 @@ user_change_locked_authorized_cb (Daemon
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1545,17 +1555,16 @@ user_change_locked_authorized_cb (Daemon
{
gboolean locked = GPOINTER_TO_INT (data);
GError *error;
g_autoptr(GError) error = NULL;
- const gchar *argv[5];
+ const gchar *argv[4];
......@@ -144,9 +144,9 @@
+ argv[2] = user->user_name;
+ argv[3] = NULL;
error = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1710,11 +1719,11 @@ user_change_account_type_authorized_cb (Daemon
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1674,11 +1683,11 @@ user_change_account_type_authorized_cb (Daemon
g_free (groups);
......@@ -162,8 +162,17 @@
+ argv[4] = str->str;
argv[5] = NULL;
g_string_free (str, FALSE);
@@ -1781,10 +1790,8 @@ user_change_password_mode_authorized_cb (Daemon
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1728,7 +1737,7 @@ user_change_password_mode_authorized_cb (Daemon
{
PasswordMode mode = GPOINTER_TO_INT (data);
g_autoptr(GError) error = NULL;
- const gchar *argv[6];
+ const gchar *argv[5];
if (user->password_mode != mode) {
sys_log (context,
@@ -1741,10 +1750,8 @@ user_change_password_mode_authorized_cb (Daemon
mode == PASSWORD_MODE_NONE) {
argv[0] = "/usr/bin/passwd";
......@@ -174,9 +183,9 @@
+ argv[1] = user->user_name;
+ argv[2] = NULL;
error = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1794,12 +1801,11 @@ user_change_password_mode_authorized_cb (Daemon
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1752,12 +1759,11 @@ user_change_password_mode_authorized_cb (Daemon
}
if (mode == PASSWORD_MODE_SET_AT_LOGIN) {
......@@ -191,9 +200,9 @@
+ argv[3] = user->user_name;
+ argv[4] = NULL;
error = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1823,11 +1829,10 @@ user_change_password_mode_authorized_cb (Daemon
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1779,11 +1785,10 @@ user_change_password_mode_authorized_cb (Daemon
}
}
else if (user->locked) {
......@@ -207,18 +216,18 @@
+ argv[2] = user->user_name;
+ argv[3] = NULL;
error = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1890,7 +1895,7 @@ user_change_password_authorized_cb (Daemon
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1853,7 +1858,7 @@ user_change_password_authorized_cb (Daemon
{
gchar **strings = data;
GError *error;
g_autoptr(GError) error = NULL;
- const gchar *argv[6];
+ const gchar *argv[5];
sys_log (context,
"set password and hint of user '%s' (%d)",
@@ -1898,12 +1903,11 @@ user_change_password_authorized_cb (Daemon
@@ -1861,12 +1866,11 @@ user_change_password_authorized_cb (Daemon
g_object_freeze_notify (G_OBJECT (user));
......@@ -232,5 +241,5 @@
+ argv[3] = user->user_name;
+ argv[4] = NULL;
error = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
......@@ -15,7 +15,7 @@ share/dbus-1/interfaces/org.freedesktop.Accounts.xml
share/dbus-1/system-services/org.freedesktop.Accounts.service
share/gir-1.0/AccountsService-1.0.gir
share/locale/ar/LC_MESSAGES/accounts-service.mo
share/locale/bg_BG/LC_MESSAGES/accounts-service.mo
share/locale/bg/LC_MESSAGES/accounts-service.mo
share/locale/bn_IN/LC_MESSAGES/accounts-service.mo
share/locale/ca/LC_MESSAGES/accounts-service.mo
share/locale/ca@valencia/LC_MESSAGES/accounts-service.mo
......@@ -26,7 +26,7 @@ share/locale/el/LC_MESSAGES/accounts-service.mo
share/locale/en_GB/LC_MESSAGES/accounts-service.mo
share/locale/eo/LC_MESSAGES/accounts-service.mo
share/locale/es/LC_MESSAGES/accounts-service.mo
share/locale/fa_IR/LC_MESSAGES/accounts-service.mo
share/locale/fa/LC_MESSAGES/accounts-service.mo
share/locale/fi/LC_MESSAGES/accounts-service.mo
share/locale/fr/LC_MESSAGES/accounts-service.mo
share/locale/ga/LC_MESSAGES/accounts-service.mo
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment