ports/112219: [PATCH] sysutils/system-tools-backends: [SUMMARIZE CHANGES]

Sergio Lenzi lenzi at k1.com.br
Sat Apr 28 23:30:46 UTC 2007


>Number:         112219
>Category:       ports
>Synopsis:       [PATCH] sysutils/system-tools-backends: [SUMMARIZE CHANGES]
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 28 23:30:06 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Sergio Lenzi
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
k1 sistemas
>Environment:
System: FreeBSD k1.com.br 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Sat Nov  4 17:26:48 BRST
>Description:
[DESCRIBE CHANGES]
pw adduser must have the -m flag to create home directories
and the flag is missing in Users.pm
Also FreeBSD sets the password in masterpwd in md5 format,
so it is better to let the pw command to set the password
the -h (lowercase h) is needed to do so...
a -r (remove home directories is added in the patch)

Another patch is needed in liboobs to let the user type the
plain password via a pipe to the Uses.pm.
I submitted the patch after this

Added file(s):
- files/patch-Users.pm

Port maintainer (gnome at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- system-tools-backends-2.2.1_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/system-tools-backends/files/patch-Users.pm /fileserver/ports/sysutils/system-tools-backends/files/patch-Users.pm
--- /usr/ports/sysutils/system-tools-backends/files/patch-Users.pm	Wed Dec 31 21:00:00 1969
+++ /fileserver/ports/sysutils/system-tools-backends/files/patch-Users.pm	Sun Apr 22 23:06:00 2007
@@ -0,0 +1,47 @@
+--- Users/Users.pm.orig	Thu Oct  5 09:27:21 2006
++++ Users/Users.pm	Sun Apr 22 23:05:41 2007
+@@ -458,7 +458,7 @@
+ 	
+   if ($Utils::Backend::tool{"system"} eq "FreeBSD")
+   {
+-    $command = "$cmd_pw userdel -n \'" . $$user[$LOGIN] . "\' ";
++    $command = "$cmd_pw userdel -n \'" . $$user[$LOGIN] . "\' -r ";
+   }
+   else
+   {
+@@ -538,10 +538,10 @@
+   {
+     my $pwdpipe;
+     my $home;
++    my $user;
+ 
+-    # FreeBSD doesn't create the home directory
+     $home = $$user[$HOME];
+-    &Utils::File::run ("$tool_mkdir -p $home");
++    $user = $$user[$LOGIN];
+ 
+     $command = "$cmd_pw useradd " .
+         " -n \'" . $$user[$LOGIN] . "\'" .
+@@ -549,11 +549,12 @@
+         " -d \'" . $$user[$HOME]  . "\'" .
+         " -g \'" . $$user[$GID]   . "\'" .
+         " -s \'" . $$user[$SHELL] . "\'" .
+-        " -H 0"; # pw(8) reads password from STDIN
++        " -m -h 0"; # pw(8) reads password from STDIN
+ 
+     $pwdpipe = &Utils::File::run_pipe_write ($command);
+     print $pwdpipe $$user[$PASSWD];
+     &Utils::File::close_file ($pwdpipe);
++    &Utils::File::run ("chown -R $user $home");
+   }
+   elsif ($Utils::Backend::tool{"system"} eq "SunOS")
+   {
+@@ -629,7 +630,7 @@
+         " -d \'" . $$new_user[$HOME]  . "\'" .
+         " -g \'" . $$new_user[$GID]   . "\'" .
+         " -s \'" . $$new_user[$SHELL] . "\'" .
+-        " -H 0"; # pw(8) reads password from STDIN
++        " -h 0"; # pw(8) reads password from STDIN
+ 
+     $pwdpipe = &Utils::File::run_pipe_write ($command);
+     print $pwdpipe $$new_user[$PASSWD];
--- system-tools-backends-2.2.1_2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list