*** winsup/utils/mkgroup.c	2001/04/26 19:02:52	1.3
--- winsup/utils/mkgroup.c	2002/03/06 14:10:18
***************
*** 367,370 ****
--- 367,373 ----
    fprintf (stderr, "                          specified (or from the current domain if there is\n");
    fprintf (stderr, "                          no domain specified)\n");
+   fprintf (stderr, "   -a,--all               print both local and global group information from the\n");
+   fprintf (stderr, "                          specified domain (or from the current domain if there is\n");
+   fprintf (stderr, "                          no domain specified) but do not complain if not in a domain\n");
    fprintf (stderr, "   -o,--id-offset offset  change the default offset (10000) added to uids\n");
    fprintf (stderr, "                          in domain accounts.\n");
***************
*** 416,419 ****
--- 419,424 ----
            switch (i)
  	    {
+ 	    case 'a':
+ 	      print_domain = -1;
  	    case 'l':
  	      print_local = 1;
***************
*** 439,443 ****
          if (!print_local && !print_domain)
            {
! 	    fprintf (stderr, "%s: Specify one of `-l' or `-d'\n", argv[0]);
  	    return 1;
  	  }
--- 444,448 ----
          if (!print_local && !print_domain)
            {
! 	    fprintf (stderr, "%s: Specify one of `-l', `-d' or `-a'\n", argv[0]);
  	    return 1;
  	  }
***************
*** 447,451 ****
  	      {
  	        fprintf (stderr, "%s: A domain name is only accepted "
! 	      		         "when `-d' is given.\n", argv[0]);
  	        return 1;
  	      }
--- 452,456 ----
  	      {
  	        fprintf (stderr, "%s: A domain name is only accepted "
! 	      		         "when `-d' or `-a' is given.\n", argv[0]);
  	        return 1;
  	      }
***************
*** 545,553 ****
        if (rc != ERROR_SUCCESS)
  	{
! 	  fprintf (stderr, "Cannot get PDC, code = %ld\n", rc);
! 	  exit (1);
  	}
! 
!       enum_groups (servername, print_sids, print_users, id_offset);
      }
  
--- 550,561 ----
        if (rc != ERROR_SUCCESS)
  	{
! 	  if (print_domain > 0) 
! 	    {
! 	      fprintf (stderr, "Cannot get DC, code = %ld\n", rc);
! 	      exit (1);
! 	    }
  	}
!       else
! 	enum_groups (servername, print_sids, print_users, id_offset);
      }
  
*** winsup/utils/mkpasswd.c	2001/04/26 19:02:52	1.4
--- winsup/utils/mkpasswd.c	2002/03/06 14:10:19
***************
*** 321,324 ****
--- 321,326 ----
    fprintf (stderr, "   -d,--domain             print domain accounts (from current domain\n");
    fprintf (stderr, "                           if no domain specified)\n");
+   fprintf (stderr, "   -a,--all                print local and domain accounts (from current domain\n");
+   fprintf (stderr, "                           if no domain specified) without complaining if not in domain\n");
    fprintf (stderr, "   -o,--id-offset offset   change the default offset (10000) added to uids\n");
    fprintf (stderr, "                           in domain accounts.\n");
***************
*** 379,382 ****
--- 381,386 ----
  	  switch (i)
  	    {
+ 	    case 'a':
+ 	      print_domain = -1;
  	    case 'l':
  	      print_local = 1;
***************
*** 416,420 ****
  	if (!print_local && !print_domain && !print_local_groups)
  	  {
! 	    fprintf (stderr, "%s: Specify one of `-l', `-d' or `-g'\n", argv[0]);
  	    return 1;
  	  }
--- 420,424 ----
  	if (!print_local && !print_domain && !print_local_groups)
  	  {
! 	    fprintf (stderr, "%s: Specify one of `-l', `-d', `-a' or `-g'\n", argv[0]);
  	    return 1;
  	  }
***************
*** 424,428 ****
  	      {
  		fprintf (stderr, "%s: A domain name is only accepted "
! 				 "when `-d' is given.\n", argv[0]);
  		return 1;
  	      }
--- 428,432 ----
  	      {
  		fprintf (stderr, "%s: A domain name is only accepted "
! 				 "when `-d' or `-a' is given.\n", argv[0]);
  		return 1;
  	      }
***************
*** 528,536 ****
        if (rc != ERROR_SUCCESS)
  	{
! 	  fprintf (stderr, "Cannot get DC, code = %ld\n", rc);
! 	  exit (1);
  	}
! 
!       enum_users (servername, print_sids, print_cygpath, passed_home_path, id_offset);
      }
  
--- 532,543 ----
        if (rc != ERROR_SUCCESS)
  	{
! 	  if (print_domain > 0) 
! 	    {
! 	      fprintf (stderr, "Cannot get DC, code = %ld\n", rc);
! 	      exit (1);
! 	    }
  	}
!       else
! 	enum_users (servername, print_sids, print_cygpath, passed_home_path, id_offset);
      }
  

