From nobody@FreeBSD.org  Tue May  4 07:30:42 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 03E4E106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 May 2010 07:30:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id E753D8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 May 2010 07:30:41 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o447UfKn048192
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 May 2010 07:30:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o447UfKp048191;
	Tue, 4 May 2010 07:30:41 GMT
	(envelope-from nobody)
Message-Id: <201005040730.o447UfKp048191@www.freebsd.org>
Date: Tue, 4 May 2010 07:30:41 GMT
From: "Vasiliy P. Melnik" <basil@vpm.net.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: - fix bug "Samba 3 domain SID is invalid!" when creating domain record
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         146291
>Category:       ports
>Synopsis:       sysutils/ldap-account-manager: fix bug "Samba 3 domain SID is invalid!" when creating domain record
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sylvio
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 04 07:40:00 UTC 2010
>Closed-Date:    Tue Jun 01 01:27:01 UTC 2010
>Last-Modified:  Tue Jun  1 01:40:03 UTC 2010
>Originator:     Vasiliy P. Melnik
>Release:        8.0-RELEASE-p2
>Organization:
na
>Environment:
FreeBSD monkey.home 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Sat Mar 27 03:57:42 EET 2010 root@monkey.home:/usr/obj/usr/src/sys/monkey i386
>Description:
- fix bug "Samba 3 domain SID is invalid!" when creating domain record
>How-To-Repeat:

>Fix:
===> Generating patch
===> Viewing diff with more
Files /usr/ports/sysutils/ldap-account-manager/Makefile and /root/ldap-account-manager/Makefile differ
diff -ruN --exclude=CVS /usr/ports/sysutils/ldap-account-manager/files/patch-account.inc /root/ldap-account-manager/files/patch-account.inc
--- /usr/ports/sysutils/ldap-account-manager/files/patch-account.inc	1970-01-01 03:00:00.000000000 +0300
+++ /root/ldap-account-manager/files/patch-account.inc	2010-05-01 11:34:31.000000000 +0300
@@ -0,0 +1,42 @@
+--- lib/account.inc.orig	2010-03-24 20:22:38.000000000 +0200
++++ lib/account.inc	2010-05-01 11:21:49.000000000 +0300
+@@ -1,6 +1,6 @@
+ <?php
+ /*
+-$Id: account.inc,v 1.247 2010/02/14 18:01:19 gruberroland Exp $
++$Id: account.inc,v 1.250 2010/04/30 21:07:47 gruberroland Exp $
+ 
+   This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
+   Copyright (C) 2003 - 2006  Tilo Lutz
+@@ -39,10 +39,10 @@
+ * @return array list of shell names
+ */
+ function getshells() {
+-	if (!isset($_SESSION['lampath'])) return array();
++	$shellPath = dirname(__FILE__) . '/../config/shells';
+ 	// Load shells from file
+-	if (file_exists($_SESSION['lampath'] . 'config/shells')) {
+-		$shells = file($_SESSION['lampath'] . 'config/shells');
++	if (file_exists($shellPath)) {
++		$shells = file($shellPath);
+ 		$i = 0;
+ 		while (count($shells) > $i) {
+ 			// remove whitespaces
+@@ -386,6 +386,9 @@
+ 		case 'hostname':	
+ 					$pregexpr = '/^([[:alnum:]@\\.\\ \\_\\$-])+$/u';
+ 					break;
++		case 'hostObject':
++					$pregexpr = '/^[!]?([[:alnum:]@\\.\\ \\_\\$\\*-])+$/u';
++					break;
+ 		case 'usernameList':	// comma separated list of user names
+ 		case 'groupnameList':	// comma separated list of group names
+ 					$pregexpr = '/^([[:alnum:]@\\.\\ \\_-])+(,([[:alnum:]@\\.\\ \\_-])+)*$/u';
+@@ -467,6 +470,7 @@
+ 					break;
+ 		case 'domainSID': // Samba domain SID
+ 					$pregexpr = "/^S\\-[0-9]\\-[0-9]\\-[0-9]{2,2}\\-[0-9]+\\-[0-9]+\\-[0-9]+$/";
++					break;
+ 		case 'ip': // IP address
+ 					$pregexpr = '/^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}$/';
+ 					break;
diff -ruN --exclude=CVS /usr/ports/sysutils/ldap-account-manager/pkg-plist /root/ldap-account-manager/pkg-plist
--- /usr/ports/sysutils/ldap-account-manager/pkg-plist	2010-04-30 17:58:13.000000000 +0300
+++ /root/ldap-account-manager/pkg-plist	2010-05-01 12:11:01.000000000 +0300
@@ -137,6 +137,7 @@
 %%WWWDIR%%/lib/.htaccess
 %%WWWDIR%%/lib/tools.inc
 %%WWWDIR%%/lib/account.inc
+%%WWWDIR%%/lib/account.inc.orig
 %%WWWDIR%%/lib/baseModule.inc
 %%WWWDIR%%/lib/baseType.inc
 %%WWWDIR%%/lib/cache.inc
===> Done

Patch attached with submission follows:

===> Generating patch
===> Viewing diff with more
Files /usr/ports/sysutils/ldap-account-manager/Makefile and /root/ldap-account-manager/Makefile differ
diff -ruN --exclude=CVS /usr/ports/sysutils/ldap-account-manager/files/patch-account.inc /root/ldap-account-manager/files/patch-account.inc
--- /usr/ports/sysutils/ldap-account-manager/files/patch-account.inc	1970-01-01 03:00:00.000000000 +0300
+++ /root/ldap-account-manager/files/patch-account.inc	2010-05-01 11:34:31.000000000 +0300
@@ -0,0 +1,42 @@
+--- lib/account.inc.orig	2010-03-24 20:22:38.000000000 +0200
++++ lib/account.inc	2010-05-01 11:21:49.000000000 +0300
+@@ -1,6 +1,6 @@
+ <?php
+ /*
+-$Id: account.inc,v 1.247 2010/02/14 18:01:19 gruberroland Exp $
++$Id: account.inc,v 1.250 2010/04/30 21:07:47 gruberroland Exp $
+ 
+   This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
+   Copyright (C) 2003 - 2006  Tilo Lutz
+@@ -39,10 +39,10 @@
+ * @return array list of shell names
+ */
+ function getshells() {
+-	if (!isset($_SESSION['lampath'])) return array();
++	$shellPath = dirname(__FILE__) . '/../config/shells';
+ 	// Load shells from file
+-	if (file_exists($_SESSION['lampath'] . 'config/shells')) {
+-		$shells = file($_SESSION['lampath'] . 'config/shells');
++	if (file_exists($shellPath)) {
++		$shells = file($shellPath);
+ 		$i = 0;
+ 		while (count($shells) > $i) {
+ 			// remove whitespaces
+@@ -386,6 +386,9 @@
+ 		case 'hostname':	
+ 					$pregexpr = '/^([[:alnum:]@\\.\\ \\_\\$-])+$/u';
+ 					break;
++		case 'hostObject':
++					$pregexpr = '/^[!]?([[:alnum:]@\\.\\ \\_\\$\\*-])+$/u';
++					break;
+ 		case 'usernameList':	// comma separated list of user names
+ 		case 'groupnameList':	// comma separated list of group names
+ 					$pregexpr = '/^([[:alnum:]@\\.\\ \\_-])+(,([[:alnum:]@\\.\\ \\_-])+)*$/u';
+@@ -467,6 +470,7 @@
+ 					break;
+ 		case 'domainSID': // Samba domain SID
+ 					$pregexpr = "/^S\\-[0-9]\\-[0-9]\\-[0-9]{2,2}\\-[0-9]+\\-[0-9]+\\-[0-9]+$/";
++					break;
+ 		case 'ip': // IP address
+ 					$pregexpr = '/^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}$/';
+ 					break;
diff -ruN --exclude=CVS /usr/ports/sysutils/ldap-account-manager/pkg-plist /root/ldap-account-manager/pkg-plist
--- /usr/ports/sysutils/ldap-account-manager/pkg-plist	2010-04-30 17:58:13.000000000 +0300
+++ /root/ldap-account-manager/pkg-plist	2010-05-01 12:11:01.000000000 +0300
@@ -137,6 +137,7 @@
 %%WWWDIR%%/lib/.htaccess
 %%WWWDIR%%/lib/tools.inc
 %%WWWDIR%%/lib/account.inc
+%%WWWDIR%%/lib/account.inc.orig
 %%WWWDIR%%/lib/baseModule.inc
 %%WWWDIR%%/lib/baseType.inc
 %%WWWDIR%%/lib/cache.inc
===> Done


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sylvio 
Responsible-Changed-By: sylvio 
Responsible-Changed-When: Wed May 5 23:29:39 UTC 2010 
Responsible-Changed-Why:  
I'll take it. 

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

From: =?ISO-8859-1?Q?Sylvio_C=E9sar?= <scjamorim@bsd.com.br>
To: bug-followup@FreeBSD.org, basil@vpm.net.ua
Cc:  
Subject: Re: ports/146291: sysutils/ldap-account-manager: fix bug "Samba 3 
	domain SID is invalid!" when creating domain record
Date: Sat, 8 May 2010 12:12:37 -0300

 Please, send again. This patch is wrong. It's duplicate and file of
 patch is into of pkg-plist. Fix it please.
State-Changed-From-To: open->feedback 
State-Changed-By: sylvio 
State-Changed-When: Mon May 10 22:02:38 UTC 2010 
State-Changed-Why:  
- Waiting feedback of submitter. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146291 
State-Changed-From-To: feedback->closed 
State-Changed-By: sylvio 
State-Changed-When: Tue Jun 1 01:26:59 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/146291: commit references a PR
Date: Tue,  1 Jun 2010 01:34:16 +0000 (UTC)

 sylvio      2010-06-01 01:34:00 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/ldap-account-manager Makefile pkg-plist 
   Added files:
     sysutils/ldap-account-manager/files patch-account.inc 
   Log:
   - Fix bug "Samba 3 domain SID is invalid!" when creating domain record
   - BUMP PORTREVISION
   
   PR:             ports/146291
   Submitted by:   Vasiliy P. Melnik <basil@vpm.net.ua>
   
   Revision  Changes    Path
   1.47      +1 -1      ports/sysutils/ldap-account-manager/Makefile
   1.1       +34 -0     ports/sysutils/ldap-account-manager/files/patch-account.inc (new)
   1.27      +1 -0      ports/sysutils/ldap-account-manager/pkg-plist
 _______________________________________________
 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"
 
>Unformatted:
