From d6c2be1873ad9fc4d2c0903f80ff9d3c6eb8e66e Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Mon, 17 Jan 2011 20:49:21 +0000 Subject: [PATCH] Tweaks. ok jasper@ --- sysutils/system-tools-backends/Makefile | 4 +-- .../patches/patch-Users_Users_pm | 28 ++++++++++++------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/sysutils/system-tools-backends/Makefile b/sysutils/system-tools-backends/Makefile index f32e6c1d5d6..1de13c4cfc4 100644 --- a/sysutils/system-tools-backends/Makefile +++ b/sysutils/system-tools-backends/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.9 2011/01/17 18:54:42 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.10 2011/01/17 20:49:21 ajacoutot Exp $ COMMENT= cross-platform configuration modules GNOME_VERSION= 2.10.1 GNOME_PROJECT= system-tools-backends -REVISION= 4 +REVISION= 5 CATEGORIES= sysutils diff --git a/sysutils/system-tools-backends/patches/patch-Users_Users_pm b/sysutils/system-tools-backends/patches/patch-Users_Users_pm index 127d2cc87be..b8a9a66594d 100644 --- a/sysutils/system-tools-backends/patches/patch-Users_Users_pm +++ b/sysutils/system-tools-backends/patches/patch-Users_Users_pm @@ -1,6 +1,6 @@ -$OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ +$OpenBSD: patch-Users_Users_pm,v 1.3 2011/01/17 20:49:21 ajacoutot Exp $ --- Users/Users.pm.orig Sat Aug 21 15:18:12 2010 -+++ Users/Users.pm Mon Jan 17 19:20:49 2011 ++++ Users/Users.pm Mon Jan 17 21:48:17 2011 @@ -58,7 +58,7 @@ use Utils::Replace; # They are tried in array order. First found = used. @passwd_names = ( "/etc/passwd" ); @@ -10,7 +10,15 @@ $OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ @shell_names = ( "/etc/shells" ); @skel_dir = ( "/usr/share/skel", "/etc/skel" ); -@@ -236,6 +236,12 @@ my $freebsd_logindefs_defaults = { +@@ -72,6 +72,7 @@ $cmd_deluser = &Utils::File::locate_tool ("deluser"); + + $cmd_chfn = &Utils::File::locate_tool ("chfn"); + $cmd_pw = &Utils::File::locate_tool ("pw"); ++$cmd_user = &Utils::File::locate_tool ("user"); + + $cmd_passwd = &Utils::File::locate_tool ("passwd"); + $cmd_chpasswd = &Utils::File::locate_tool ("chpasswd"); +@@ -236,6 +237,12 @@ my $freebsd_logindefs_defaults = { 'skel_dir' => '/etc/skel/', }; @@ -23,7 +31,7 @@ $OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ my $logindefs_dist_map = { 'redhat-6.2' => $rh_logindefs_defaults, 'redhat-7.0' => $rh_logindefs_defaults, -@@ -252,6 +258,7 @@ my $logindefs_dist_map = { +@@ -252,6 +259,7 @@ my $logindefs_dist_map = { 'archlinux' => $gentoo_logindefs_defaults, 'slackware-9.1.0' => $gentoo_logindefs_defaults, 'freebsd-5' => $freebsd_logindefs_defaults, @@ -31,7 +39,7 @@ $OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ 'suse-9.0' => $gentoo_logindefs_defaults, 'solaris-2.11' => $gentoo_logindefs_defaults, }; -@@ -384,9 +391,17 @@ sub get +@@ -384,9 +392,17 @@ sub get # Detect lock status of password # We run 'passwd' instead of reading /etc/shadow directly # to avoid leaving sensitive data in memory (hard to clear in perl) @@ -52,7 +60,7 @@ $OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ if ($passwd_status[1] eq "P") { -@@ -441,6 +456,17 @@ sub del_user +@@ -441,6 +457,17 @@ sub del_user @command = ($cmd_pw, "userdel", "-n", $$user[$LOGIN]); } } @@ -70,7 +78,7 @@ $OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ elsif ($cmd_deluser) # use deluser (preferred method) { if ($remove_home) -@@ -497,11 +523,15 @@ sub set_passwd +@@ -497,11 +524,15 @@ sub set_passwd my ($login, $password, $passwd_status) = @_; my ($pwdpipe); @@ -90,7 +98,7 @@ $OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ } if ($Utils::Backend::tool{"system"} eq "FreeBSD") -@@ -520,7 +550,7 @@ sub set_passwd +@@ -520,7 +551,7 @@ sub set_passwd print $pwdpipe $password; &Utils::File::close_file ($pwdpipe); } @@ -99,7 +107,7 @@ $OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ { $pwdpipe = &Utils::File::run_pipe_write ($cmd_chpasswd); print $pwdpipe "$login:$password"; -@@ -534,14 +564,17 @@ sub set_lock +@@ -534,14 +565,17 @@ sub set_lock my ($login, $passwd_status) = @_; my ($pwdpipe); @@ -123,7 +131,7 @@ $OpenBSD: patch-Users_Users_pm,v 1.2 2011/01/17 18:54:42 ajacoutot Exp $ } # This function allows empty values to be passed, in which cas -@@ -620,7 +653,8 @@ sub add_user +@@ -620,7 +654,8 @@ sub add_user $Utils::Backend::tool{"platform"} !~ /^slackware/ && $Utils::Backend::tool{"platform"} !~ /^archlinux/ && $Utils::Backend::tool{"platform"} !~ /^redhat/ &&