fix from Brad Langhorst to correctly check if the primaryGroupID has been set
authorGerald Carter <jerry@samba.org>
Sat, 20 Sep 2003 15:29:27 +0000 (15:29 +0000)
committerGerald Carter <jerry@samba.org>
Sat, 20 Sep 2003 15:29:27 +0000 (15:29 +0000)
(This used to be commit db0d8f76ba9fbd090b62cb1233b566040e36f552)

examples/LDAP/convertSambaAccount

index d2770c75a687592be7bb1442c1d3e9f544300fe2..e00d0a2326ec8594812e74b0f6e8f9f0a43073a1 100755 (executable)
@@ -170,7 +170,7 @@ while ( !$ldif->eof ) {
                $entry->add( 'sambaSID' => $domsid."-".$entry->get_value( "rid" ) );
                $entry->delete( 'rid' );
        
-               if ( $entry->get_value( "primaryGroupID" ) ) {
+               if ( defined($entry->get_value( "primaryGroupID" )) ) {
                        push @adds, "sambaPrimaryGroupSID: " . $domsid."-".$entry->get_value( "primaryGroupID" );
                        push @dels, "primaryGroupID";
                        $entry->add( 'sambaPrimaryGroupSID' => $domsid."-".$entry->get_value( "primaryGroupID" ) );