From lzt@k1.com.br  Sat Apr 28 23:21:50 2007
Return-Path: <lzt@k1.com.br>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A926116A406;
	Sat, 28 Apr 2007 23:21:50 +0000 (UTC)
	(envelope-from lzt@k1.com.br)
Received: from netuno.levier.com.br (netuno.levier.com.br [200.208.76.130])
	by mx1.freebsd.org (Postfix) with ESMTP id E290C13C459;
	Sat, 28 Apr 2007 23:21:39 +0000 (UTC)
	(envelope-from lzt@k1.com.br)
Received: from sip.cwb.casa ([172.16.198.5])
	by netuno.propagar (8.13.6/8.13.6) with ESMTP id l3SMnvc2020004;
	Sat, 28 Apr 2007 19:49:59 -0300 (BRT)
	(envelope-from lzt@k1.com.br)
Received: from k1.com.br ([192.168.6.9])
	by sip.cwb.casa (8.13.3/8.13.3) with ESMTP id l3SMnsCu095584;
	Sat, 28 Apr 2007 19:49:55 -0300 (BRT)
	(envelope-from lzt@k1.com.br)
Received: from k1.com.br (localhost [127.0.0.1])
	by k1.com.br (8.13.6/8.13.6) with ESMTP id l3SMpDHR010312;
	Sat, 28 Apr 2007 19:51:13 -0300 (BRT)
	(envelope-from lzt@k1.com.br)
Received: (from root@localhost)
	by k1.com.br (8.13.6/8.13.6/Submit) id l3SMpBKp010311;
	Sat, 28 Apr 2007 19:51:11 -0300 (BRT)
	(envelope-from lzt)
Message-Id: <200704282251.l3SMpBKp010311@k1.com.br>
Date: Sat, 28 Apr 2007 19:51:11 -0300 (BRT)
From: Sergio Lenzi <lenzi@k1.com.br>
To: FreeBSD-gnats-submit@freebsd.org
Cc: gnome@freebsd.org
Subject: [PATCH] sysutils/system-tools-backends: [SUMMARIZE CHANGES]
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         112219
>Category:       ports
>Synopsis:       [PATCH] sysutils/system-tools-backends: [SUMMARIZE CHANGES]
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 28 23:30:06 GMT 2007
>Closed-Date:    Sun Apr 29 05:32:25 GMT 2007
>Last-Modified:  Sun Apr 29 05:32:25 GMT 2007
>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@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:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Apr 28 23:30:55 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112219 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/112219: commit references a PR
Date: Sun, 29 Apr 2007 05:29:52 +0000 (UTC)

 marcus      2007-04-29 05:29:45 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/system-tools-backends Makefile 
   Added files:
     sysutils/system-tools-backends/files patch-Users_Users.pm 
   Log:
   Pass the -m flag to pw so that user home directories are created.  Also,
   pass -r to pw when removing user accounts.
   
   PR:             112219
   Submitted by:   Sergio Lenzi <lenzi@k1.com.br>
   
   Revision  Changes    Path
   1.16      +1 -1      ports/sysutils/system-tools-backends/Makefile
   1.1       +47 -0     ports/sysutils/system-tools-backends/files/patch-Users_Users.pm (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Sun Apr 29 05:32:13 UTC 2007 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112219 
>Unformatted:
