[Samba] problem with smbldap-usermod for SOME users

Jerome Tournier jerome.tournier at idealx.com
Thu Mar 10 17:15:47 GMT 2005


Le Thu, Mar 10, 2005 at 04:21:13PM +0100, Heupink, Mourik Jan C. a ecrit:
> hostname:~ # smbldap-usermod -B1 user1
> Use of uninitialized value in pattern match (m//) at
> /usr/local/sbin/smbldap-usermod line 355, <DATA> line 283.
Can you test the attached patch please.
-- 
Jerome
-------------- next part --------------
--- smbldap-usermod.orig	2005-03-10 18:13:16.493374521 +0100
+++ smbldap-usermod	2005-03-10 18:13:00.920550833 +0100
@@ -352,7 +352,7 @@ if (defined($tmp = $Options{'B'})) {
       # . the attribut sambaAcctFlags must not match the 'X' flag
       my $_sambaAcctFlags;
       my $flags = $user_entry->get_value('sambaAcctFlags');
-      if ( $flags =~ /X/ ) {
+      if ( defined $flags and $flags =~ /X/ ) {
       	my $letters;
       	if ($flags =~ /(\w+)/) {
 	  $letters = $1;


More information about the samba mailing list