Tweaks.
ok jasper@
This commit is contained in:
parent
8865e138dc
commit
d6c2be1873
@ -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
|
||||
|
||||
|
@ -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/ &&
|
||||
|
Loading…
Reference in New Issue
Block a user