delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/06/12:17:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <4.3.1.2.20020306121508.0168b928@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Wed, 06 Mar 2002 12:17:02 -0500
To: Corinna Vinschen <cygwin AT cygwin DOT com>
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: Suggestion for setup
In-Reply-To: <20020306180252.B13590@cygbert.vinschen.de>
References: <20020306164347 DOT GB14100 AT redhat DOT com>
<17B78BDF120BD411B70100500422FC6309E4B5 AT IIS000>
<20020306163224 DOT Z13590 AT cygbert DOT vinschen DOT de>
<20020306164347 DOT GB14100 AT redhat DOT com>
Mime-Version: 1.0

At 12:02 PM 3/6/2002, Corinna Vinschen wrote:
>On Wed, Mar 06, 2002 at 11:43:47AM -0500, Chris Faylor wrote:
> > On Wed, Mar 06, 2002 at 04:32:24PM +0100, Corinna Vinschen wrote:
> > >On Wed, Mar 06, 2002 at 03:01:05PM +0100, Bernard Dautrevaux wrote:
> > >> As this is quite a simple patch, I proceed and here it is, for mkgroup.c and
> > >> mkpasswd.c:
> > >
> > >I have two problems with this patch:
> > >
> > >- No ChangeLog entry.
> > >- Do we have a signed copyright assignment from you?
> > 
> > The patch also seemed to have some strange characters in it, at least on my
> > system.
>
>Right, I'm seeing these pipe characters:
>
>***************
>*** 379,382 ****
>--- 381,386 ----
>   |   switch (i)
>   |     {
>+ |     case 'a':
>+ |       print_domain = -1;
>   |     case 'l':
>   |       print_local = 1;
>
>You too?


I know your question was directed at Chris but I can say the patch I got 
had no strange characters.  I've included it below in case a comparative
analysis is useful.


----- Cut here -----

*** 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);



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019