Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 May 2010 07:30:41 GMT
From:      "Vasiliy P. Melnik" <basil@vpm.net.ua>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/146291: - fix bug "Samba 3 domain SID is invalid!" when creating domain record
Message-ID:  <201005040730.o447UfKp048191@www.freebsd.org>
Resent-Message-ID: <201005040740.o447e0Ct072489@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         146291
>Category:       ports
>Synopsis:       - fix bug "Samba 3 domain SID is invalid!" when creating domain record
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 04 07:40:00 UTC 2010
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005040730.o447UfKp048191>