2007-09-06 Lin Ma <[email protected]>
authorlin
Thu, 06 Sep 2007 07:47:12 +0000
changeset 10454 5358e2411d36
parent 10453 10a456a6a9e9
child 10455 06cec0d5b12e
2007-09-06 Lin Ma <[email protected]> * patches/system-tools-backends-08-users.diff: fix for 6594330 users-admin genarates ,All to profiles in /etc/user_attr causes some undesirable side effects
ChangeLog
patches/system-tools-backends-08-users.diff
--- a/ChangeLog	Wed Sep 05 17:57:21 2007 +0000
+++ b/ChangeLog	Thu Sep 06 07:47:12 2007 +0000
@@ -1,3 +1,9 @@
+2007-09-06  Lin Ma  <[email protected]>
+
+	* patches/system-tools-backends-08-users.diff: fix for 6594330
+	users-admin genarates ,All to profiles in /etc/user_attr causes
+	some undesirable side effects
+
 2007-09-05  Darren Kenny  <[email protected]>
 
 	* SUNWgnome-desktop-prefs.spec,
--- a/patches/system-tools-backends-08-users.diff	Wed Sep 05 17:57:21 2007 +0000
+++ b/patches/system-tools-backends-08-users.diff	Thu Sep 06 07:47:12 2007 +0000
@@ -1,6 +1,5 @@
-diff -u system-tools-backends-1.4.2/users-conf.in-orig system-tools-backends-1.4.2/users-conf.in
---- system-tools-backends-1.4.2/users-conf.in-orig	2006-01-02 15:48:06.000000000 +0000
-+++ system-tools-backends-1.4.2/users-conf.in	2007-02-02 15:53:30.243300000 +0000
+--- system-tools-backends-1.4.2/users-conf.in.org	2007-08-28 17:22:18.052218000 +0800
++++ system-tools-backends-1.4.2/users-conf.in	2007-08-28 17:35:02.121728000 +0800
 @@ -47,6 +47,8 @@
  # pw: modifying users/groups and user/group data on FreeBSD.
  
@@ -560,7 +559,7 @@
  		else
  		{
  		  &gst_report ("xml_unexp_tag", $$tree[0]);
-@@ -1268,10 +1600,42 @@
+@@ -1268,10 +1600,36 @@
  
  	while (@$tree)
  	{
@@ -585,18 +584,12 @@
 +      #  $$hash{"users_rbac_profiles"} = $users_rbac_profiles;
 +      #}
 +
-+      my $basic_solaris_user = 0; # will be set to 1 if we find this profile in list
 +      while (@$rbac_profiles) {
 +        my $profile = $$rbac_profiles[1][2];
-+        $basic_solaris_user = 1 if ( $profile eq "Basic Solaris User" ); # take note
-+        push(@user_profiles, $profile ) unless ( $profile eq "All" || $profile eq "Basic Solaris User" ); # only include once
++        push(@user_profiles, $profile );
 +        shift( @$rbac_profiles );
 +        shift( @$rbac_profiles );
 +      }
-+      # First include "All" special profile - needs to be always there.
-+      push(@user_profiles, "All" );
-+      push(@user_profiles, "Basic Solaris User" ) if ( $basic_solaris_user == 1 );
-+
 +      #$$users_rbac_profiles{ $line[$users_prop_map{"login"}] } = \@user_profiles;
 +      #XXX Here
 +		  $line[$users_prop_map{$$tree[0]}] = \@user_profiles;
@@ -604,7 +597,7 @@
  		else
  		{
  		  &gst_report ("xml_unexp_tag", $$tree[0]);
-@@ -1323,6 +1687,7 @@
+@@ -1323,6 +1681,7 @@
  		  if ($$tree[0] eq "users") { $line[$groups_prop_map{$$tree[0]}] = $$tree[1]; }
  			else { $line[$groups_prop_map{$$tree[0]}] = $$tree[1][2]; }
  		}
@@ -612,7 +605,7 @@
  		else
  		{
  		  &gst_report ("xml_unexp_tag", $$tree[0]);
-@@ -1487,11 +1852,18 @@
+@@ -1487,11 +1846,18 @@
    my ($hash) = @_;
    my ($key, $value, $i, $j, $k);
    my ($passwd_last_modified, $users, $desc);
@@ -631,7 +624,7 @@
  
    &gst_xml_print_begin ();
  
-@@ -1519,8 +1891,23 @@
+@@ -1519,8 +1885,23 @@
  	  &gst_xml_container_enter ('user');
  		for ($j = 0; $j < ($#users_prop_array - 1) / 2; $j++)
      {
@@ -656,7 +649,7 @@
  		&gst_xml_container_leave ();
  	}
  	&gst_xml_container_leave ();
-@@ -1559,9 +1946,30 @@
+@@ -1559,9 +1940,30 @@
  		&gst_xml_container_leave ();
  	}
  	&gst_xml_container_leave ();
@@ -689,7 +682,7 @@
  }
  
  
-@@ -1590,6 +1998,7 @@
+@@ -1590,6 +1992,7 @@
      &gst_file_backup ($_) foreach (@passwd_names);
      &gst_file_backup ($_) foreach (@shadow_names);
      &gst_file_backup ($_) foreach (@group_names);
@@ -697,7 +690,7 @@
  
      &write_profiledb ($hash);
      &write_group_passwd ($hash);
-@@ -1627,6 +2036,7 @@
+@@ -1627,6 +2030,7 @@
  $tool = &gst_init ($name, $version, $description, $directives, @ARGV);
  &gst_platform_ensure_supported ($tool, @platforms);
  
@@ -705,4 +698,3 @@
  &get_login_defs_prop_array ();
  &get_profiles_prop_array   ();
  
-