ispman/scripts ldifupdate,1.2.2.2,1.2.2.3

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19789

Modified Files:
      Tag: rel_1_1-bugfixes
	ldifupdate 
Log Message:
added check for loginShell of users and vhosts
if you suffer from bug [ 942585 ] (Big Security problem: vhost ssh into server) just run this over your ldap data


Index: ldifupdate
===================================================================
RCS file: /cvsroot/ispman/ispman/scripts/ldifupdate,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -d -r1.2.2.2 -r1.2.2.3
--- ldifupdate	7 Feb 2004 15:23:38 -0000	1.2.2.2
+++ ldifupdate	27 Apr 2004 20:00:10 -0000	1.2.2.3
@@ -22,6 +22,8 @@
 my $default_domainHomedir = "/ispman/domains";
 my @default_fileserver = qw( );
 my @default_webhost = qw( );
+my $default_loginShell = "/bin/false";
+my $default_vhostShell = "/bin/false";
 my $dummyUid = "999999";
 my $dummyGid = "999999";
 my $dummyPassword = "123456";
@@ -262,6 +264,12 @@
 	    $msg.="adding userPassword: \"$dummyPassword\" (This should be replaced later!)\n";
 	    ldif_action("add","userPassword",$dummyPassword);
 	}
+
+	# checking vhost loginShell
+	unless ($entry->get_value("loginshell")){
+	    $msg.="adding loginShell: $default_vhostShell\n";
+	    ldif_action("add","loginshell",$default_vhostShell);
+	}
 	
     } elsif ($oc{'ispmanDomainUser'}){
 	
@@ -292,6 +300,12 @@
 	    ldif_action("delete","filehost","undefined");
 	}
 
+	# checking loginShell
+	unless ($entry->get_value("loginshell")){
+	    $msg.="adding default loginShell: $default_loginShell\n";
+	    ldif_action("add","loginshell",$default_loginShell);
+	}
+	
     } else {
 	# check other entries here	
 	



-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.