Commit 812b2c29 authored by Olivier Duchateau's avatar Olivier Duchateau
Browse files

Update to 0.6.47

parent cf4c30e0
......@@ -2,7 +2,7 @@
# $FreeBSD: head/sysutils/accountsservice/Makefile 517057 2019-11-08 13:11:05Z tobik $
PORTNAME= accountsservice
PORTVERSION= 0.6.46
PORTVERSION= 0.6.47
CATEGORIES= sysutils devel
MASTER_SITES= http://www.freedesktop.org/software/${PORTNAME}/
......
TIMESTAMP = 1600426925
SHA256 (accountsservice-0.6.46.tar.xz) = 1865b98b831ce7e8656cabee213f9a6803cf45032594099410900b0557b3ad25
SIZE (accountsservice-0.6.46.tar.xz) = 385144
TIMESTAMP = 1600437030
SHA256 (accountsservice-0.6.47.tar.xz) = e34efbc79098b1a5a48e19389e6472b3b56fa9cc64c60017679e61ecc43d130d
SIZE (accountsservice-0.6.47.tar.xz) = 384260
--- src/user.c.orig 2018-04-04 13:59:43 UTC
--- src/user.c.orig 2018-04-20 20:52:07 UTC
+++ src/user.c
@@ -153,9 +153,14 @@ account_type_from_pwent (struct passwd *pwent)
@@ -138,9 +138,14 @@ user_reset_icon_file (User *user)
}
void
......@@ -14,9 +14,9 @@
+#endif
{
g_autofree gchar *real_name = NULL;
gboolean changed;
@@ -251,8 +256,10 @@ user_update_from_pwent (User *user,
}
gboolean is_system_account;
@@ -199,8 +204,10 @@ user_update_from_pwent (User *user,
accounts_user_set_shell (ACCOUNTS_USER (user), pwent->pw_shell);
passwd = NULL;
+#ifdef HAVE_SHADOW_H
......@@ -26,7 +26,7 @@
if (passwd && passwd[0] == '!') {
locked = TRUE;
@@ -274,6 +281,7 @@ user_update_from_pwent (User *user,
@@ -218,6 +225,7 @@ user_update_from_pwent (User *user,
mode = PASSWORD_MODE_NONE;
}
......@@ -34,7 +34,7 @@
if (spent) {
if (spent->sp_lstchg == 0) {
mode = PASSWORD_MODE_SET_AT_LOGIN;
@@ -287,6 +295,9 @@ user_update_from_pwent (User *user,
@@ -231,6 +239,9 @@ user_update_from_pwent (User *user,
user->days_after_expiration_until_lock = spent->sp_inact;
user->account_expiration_policy_known = TRUE;
}
......@@ -42,111 +42,114 @@
+ user->expiration_time = pwent->pw_expire;
+#endif
if (user->password_mode != mode) {
user->password_mode = mode;
@@ -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);
accounts_user_set_password_mode (ACCOUNTS_USER (user), mode);
is_system_account = !user_classify_is_human (accounts_user_get_uid (ACCOUNTS_USER (user)),
@@ -813,11 +824,11 @@ user_change_real_name_authorized_cb (Daemon
accounts_user_get_uid (ACCOUNTS_USER (user)),
name);
- argv[0] = "/usr/sbin/usermod";
- argv[1] = "-c";
- argv[2] = name;
- argv[3] = "--";
- argv[4] = user->user_name;
- argv[4] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[0] = "/usr/sbin/pw";
+ argv[1] = "usermod";
+ argv[2] = user->user_name;
+ argv[2] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[3] = "-c";
+ argv[4] = name;
argv[5] = NULL;
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);
@@ -882,11 +893,11 @@ user_change_user_name_authorized_cb (Daemon
accounts_user_get_uid (ACCOUNTS_USER (user)),
name);
- argv[0] = "/usr/sbin/usermod";
- argv[1] = "-l";
- argv[2] = name;
- argv[3] = "--";
- argv[4] = user->user_name;
- argv[4] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[0] = "/usr/sbin/pw";
+ argv[1] = "usermod";
+ argv[2] = user->user_name;
+ argv[2] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[3] = "-n";
+ argv[4] = name;
argv[5] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1262,20 +1273,19 @@ user_change_home_dir_authorized_cb (Daemon
@@ -1183,7 +1194,7 @@ user_change_home_dir_authorized_cb (Daemon
{
gchar *home_dir = data;
g_autoptr(GError) error = NULL;
- const gchar *argv[7];
+ const gchar *argv[6];
if (g_strcmp0 (user->home_dir, home_dir) != 0) {
if (g_strcmp0 (accounts_user_get_home_directory (ACCOUNTS_USER (user)), home_dir) != 0) {
sys_log (context,
"change home directory of user '%s' (%d) to '%s'",
user->user_name, user->uid, home_dir);
@@ -1192,13 +1203,12 @@ user_change_home_dir_authorized_cb (Daemon
accounts_user_get_uid (ACCOUNTS_USER (user)),
home_dir);
- argv[0] = "/usr/sbin/usermod";
- argv[1] = "-m";
- argv[2] = "-d";
- argv[3] = home_dir;
- argv[4] = "--";
- argv[5] = user->user_name;
- argv[5] = accounts_user_get_user_name (ACCOUNTS_USER (user));
- argv[6] = NULL;
+ argv[0] = "/usr/sbin/pw";
+ argv[1] = "-d";
+ argv[2] = home_dir;
+ argv[3] = "-n";
+ argv[4] = user->user_name;
+ argv[4] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[5] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
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);
@@ -1249,11 +1259,11 @@ user_change_shell_authorized_cb (Daemon
accounts_user_get_uid (ACCOUNTS_USER (user)),
shell);
- argv[0] = "/usr/sbin/usermod";
- argv[1] = "-s";
- argv[2] = shell;
- argv[3] = "--";
- argv[4] = user->user_name;
- argv[4] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[0] = "/usr/sbin/pw";
+ argv[1] = "usermod";
+ argv[2] = user->user_name;
+ argv[2] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[3] = "-s";
+ argv[4] = shell;
argv[5] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1545,17 +1555,16 @@ user_change_locked_authorized_cb (Daemon
@@ -1456,7 +1466,7 @@ user_change_locked_authorized_cb (Daemon
{
gboolean locked = GPOINTER_TO_INT (data);
g_autoptr(GError) error = NULL;
- const gchar *argv[5];
+ const gchar *argv[4];
if (user->locked != locked) {
if (accounts_user_get_locked (ACCOUNTS_USER (user)) != locked) {
sys_log (context,
"%s account of user '%s' (%d)",
locked ? "locking" : "unlocking", user->user_name, user->uid);
@@ -1464,11 +1474,10 @@ user_change_locked_authorized_cb (Daemon
locked ? "locking" : "unlocking",
accounts_user_get_user_name (ACCOUNTS_USER (user)),
accounts_user_get_uid (ACCOUNTS_USER (user)));
- argv[0] = "/usr/sbin/usermod";
- argv[1] = locked ? "-L" : "-U";
- argv[2] = "--";
- argv[3] = user->user_name;
- argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
- argv[4] = NULL;
+ argv[0] = "/usr/sbin/pw";
+ argv[1] = locked ? "lock" : "unlock";
+ argv[2] = user->user_name;
+ argv[2] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[3] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1674,11 +1683,11 @@ user_change_account_type_authorized_cb (Daemon
@@ -1589,11 +1598,11 @@ user_change_account_type_authorized_cb (Daemon
g_free (groups);
......@@ -154,38 +157,38 @@
- argv[1] = "-G";
- argv[2] = str->str;
- argv[3] = "--";
- argv[4] = user->user_name;
- argv[4] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[0] = "/usr/sbin/pw";
+ argv[1] = "usermod";
+ argv[2] = user->user_name;
+ argv[2] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[3] = "-G";
+ argv[4] = str->str;
argv[5] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
@@ -1728,7 +1737,7 @@ user_change_password_mode_authorized_cb (Daemon
@@ -1643,7 +1652,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) {
if (((PasswordMode) accounts_user_get_password_mode (ACCOUNTS_USER (user))) != mode) {
sys_log (context,
@@ -1741,10 +1750,8 @@ user_change_password_mode_authorized_cb (Daemon
@@ -1658,10 +1667,8 @@ user_change_password_mode_authorized_cb (Daemon
mode == PASSWORD_MODE_NONE) {
argv[0] = "/usr/bin/passwd";
- argv[1] = "-d";
- argv[2] = "--";
- argv[3] = user->user_name;
- argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
- argv[4] = NULL;
+ argv[1] = user->user_name;
+ argv[1] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[2] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1752,12 +1759,11 @@ user_change_password_mode_authorized_cb (Daemon
@@ -1669,12 +1676,11 @@ user_change_password_mode_authorized_cb (Daemon
}
if (mode == PASSWORD_MODE_SET_AT_LOGIN) {
......@@ -195,30 +198,30 @@
+ argv[1] = "-e";
argv[2] = "0";
- argv[3] = "--";
- argv[4] = user->user_name;
- argv[4] = accounts_user_get_user_name (ACCOUNTS_USER (user));
- argv[5] = NULL;
+ argv[3] = user->user_name;
+ argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[4] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1779,11 +1785,10 @@ user_change_password_mode_authorized_cb (Daemon
}
@@ -1690,11 +1696,10 @@ user_change_password_mode_authorized_cb (Daemon
accounts_user_set_locked (ACCOUNTS_USER (user), FALSE);
}
else if (user->locked) {
else if (accounts_user_get_locked (ACCOUNTS_USER (user))) {
- argv[0] = "/usr/sbin/usermod";
- argv[1] = "-U";
- argv[2] = "--";
- argv[3] = user->user_name;
- argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
- argv[4] = NULL;
+ argv[0] = "/usr/sbin/pw";
+ argv[1] = "unlock";
+ argv[2] = user->user_name;
+ argv[2] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[3] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
throw_error (context, ERROR_FAILED, "running '%s' failed: %s", argv[0], error->message);
@@ -1853,7 +1858,7 @@ user_change_password_authorized_cb (Daemon
@@ -1759,7 +1764,7 @@ user_change_password_authorized_cb (Daemon
{
gchar **strings = data;
g_autoptr(GError) error = NULL;
......@@ -227,7 +230,7 @@
sys_log (context,
"set password and hint of user '%s' (%d)",
@@ -1861,12 +1866,11 @@ user_change_password_authorized_cb (Daemon
@@ -1768,12 +1773,11 @@ user_change_password_authorized_cb (Daemon
g_object_freeze_notify (G_OBJECT (user));
......@@ -236,9 +239,9 @@
argv[1] = "-p";
argv[2] = strings[0];
- argv[3] = "--";
- argv[4] = user->user_name;
- argv[4] = accounts_user_get_user_name (ACCOUNTS_USER (user));
- argv[5] = NULL;
+ argv[3] = user->user_name;
+ argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+ argv[4] = NULL;
if (!spawn_with_login_uid (context, argv, &error)) {
......
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