2006-03-27 Padraig O'Briain <[email protected]>
authorpadraigo
Mon, 27 Mar 2006 09:12:25 +0000
changeset 6976 6b7c7c8fd70e
parent 6975 baa1ef4b8ff2
child 6977 ec89dca89182
2006-03-27 Padraig O'Briain <[email protected]> * patches/system-tools-backends-08-users.diff: Remove allows_to from groups_prop_array and check for it in xml_parse_group instead. Really remove -l option from usermod call on Solaris.
ChangeLog
patches/system-tools-backends-08-users.diff
--- a/ChangeLog	Mon Mar 27 07:32:03 2006 +0000
+++ b/ChangeLog	Mon Mar 27 09:12:25 2006 +0000
@@ -1,3 +1,9 @@
+2006-03-27  Padraig O'Briain <[email protected]>
+
+	* patches/system-tools-backends-08-users.diff: Remove allows_to
+	from groups_prop_array and check for it in xml_parse_group instead.
+	Really remove -l option from usermod call on Solaris.
+
 2006-03-27  Padraig O'Briain <[email protected]>
 
 	* patches/gnome-system-tools-02-forkpty.diff: Set full buffering
--- a/patches/system-tools-backends-08-users.diff	Mon Mar 27 07:32:03 2006 +0000
+++ b/patches/system-tools-backends-08-users.diff	Mon Mar 27 09:12:25 2006 +0000
@@ -31,15 +31,7 @@
  
  %groups_prop_map = ();
  @groups_prop_array = (
-@@ -165,6 +170,7 @@
- 	"password", 2,
- 	"gid", 3,
- 	"users", 4,
-+	"allows_to", 5,
- 	"", "");
- 
- for ($i = 0; $groups_prop_array[$i] ne ""; $i += 2)
-@@ -315,6 +321,20 @@
+@@ -315,6 +320,20 @@
    }
  }
  
@@ -60,7 +52,7 @@
  my $rh_logindefs_defaults = {
    'shell'       => '/bin/bash',
    'group'       => '$user',
-@@ -362,6 +382,8 @@
+@@ -362,6 +381,8 @@
    'debian-2.2'      => $rh_logindefs_defaults,
    'debian-3.0'      => $rh_logindefs_defaults,
    'debian-sarge'    => $rh_logindefs_defaults,
@@ -69,7 +61,7 @@
    'vine-3.0'        => $rh_logindefs_defaults,
    'vine-3.1'        => $rh_logindefs_defaults,
    'gentoo'	        => $gentoo_logindefs_defaults,
-@@ -740,7 +762,40 @@
+@@ -740,7 +761,40 @@
    push (@shells, "/bin/false") if (stat ("/bin/false"));
    
    $ifh = &gst_file_open_read_from_names(@shell_names);
@@ -111,7 +103,7 @@
  
    while (<$ifh>)
    {
-@@ -886,7 +941,7 @@
+@@ -886,7 +940,7 @@
      $fname = "-f \'" . $fname . "\'";
      $home_phone = "-h \'" . $home_phone . "\'";
  
@@ -120,7 +112,7 @@
      {
        $office = "-r \'" . $office . "\'";
        $office_phone = "-w \'" . $office_phone . "\'";
-@@ -932,6 +987,21 @@
+@@ -932,6 +986,21 @@
      print $pwdpipe $$data[$users_prop_map{"password"}];
      &gst_file_close ($pwdpipe);
    }
@@ -142,7 +134,7 @@
    else
    {
      $home_parents = $$data[$users_prop_map{"home"}];
-@@ -970,6 +1040,27 @@
+@@ -970,6 +1039,26 @@
      print $pwdpipe $$data[$users_prop_map{"password"}];
      &gst_file_close ($pwdpipe);
    }
@@ -161,7 +153,6 @@
 +  {
 +    $command = "$cmd_usermod" . " -d \'" . $$new_data[$users_prop_map{"home"}] .
 +     "\' -g \'" . $$new_data[$users_prop_map{"gid"}] .
-+     "\' -l \'" . $$new_data[$users_prop_map{"login"}] .
 +     "\' -s \'" . $$new_data[$users_prop_map{"shell"}] .
 +     "\' -u \'" . $$new_data[$users_prop_map{"uid"}] .
 +     "\' \'" . $$old_data[$users_prop_map{"login"}] . "\'";
@@ -170,7 +161,7 @@
    else
    {
      $command = "$cmd_usermod" . " -d \'" . $$new_data[$users_prop_map{"home"}] .
-@@ -1204,6 +1295,7 @@
+@@ -1204,6 +1293,7 @@
  		elsif ($$tree[0] eq "group_last_modified") { &xml_parse_group_last_modified ($$tree[1], $hash); }
  		elsif ($$tree[0] eq "userdb") { &xml_parse_userdb ($$tree[1], $hash); }
  		elsif ($$tree[0] eq "groupdb") { &xml_parse_groupdb ($$tree[1], $hash); }
@@ -178,7 +169,15 @@
  		elsif ($$tree[0] eq "shelldb")  { }
  		elsif ($$tree[0] eq "profiledb")  { &xml_parse_profiledb ($$tree[1], $hash); }
  		else
-@@ -1627,6 +1719,7 @@
+@@ -1323,6 +1413,7 @@
+ 		  if ($$tree[0] eq "users") { $line[$groups_prop_map{$$tree[0]}] = $$tree[1]; }
+ 			else { $line[$groups_prop_map{$$tree[0]}] = $$tree[1][2]; }
+ 		}
++		elsif ($$tree[0] eq "allows_to") { }
+ 		else
+ 		{
+ 		  &gst_report ("xml_unexp_tag", $$tree[0]);
+@@ -1627,6 +1718,7 @@
  $tool = &gst_init ($name, $version, $description, $directives, @ARGV);
  &gst_platform_ensure_supported ($tool, @platforms);