[1.7] passwd: useless if used with a logged on domain user

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Mar 23 20:46:00 GMT 2009


On Mar 23 18:26, Julio Costa wrote:
> On Mon, Mar 23, 2009 at 16:40, Corinna Vinschen wrote:
> > On Mar 23 15:33, Julio Costa wrote:
> >> On Mon, Mar 23, 2009 at 14:59, Corinna Vinschen wrote:
> >> > Using CheckTokenMembership isn't quite the way to go.  If I understand
> >> > you right that the idea is just checking if the token contains the
> >> > well-known Administrators group, I'll check in something equivalent.
> >>
> >> Ok. I'll be waiting for the a new check-in, then.
> >
> > I've applied another patch to passwd which now checks admin membership
> > by inspecting the token groups of the calling user.  As you proposed,
> > the default is now the local machine, unless trying to change the
> > caller's password itself.
> >
> 
> After a minor typo-killing:
> 
> ~/passwd $ diff -u passwd_118.c passwd_118b.c
> --- passwd_118.c        2009-03-23 17:56:55.268054500 +0000
> +++ passwd_118b.c       2009-03-23 18:10:55.925848600 +0000
> @@ -571,7 +571,7 @@
>    strcpy (user, optind >= argc ? getlogin () : argv[optind]);
> 
>    /* Changing password for calling user?  Use logonserver for user as well. */
> -  if (!server && optind < argc)
> +  if (!server && optind >= argc)
>      {
>        myself = 1;
>        if ((logonserver = getenv ("LOGONSERVER")))

Urgh.  Thanks for catching.  I fixed that together with the usage text
and the missing documentation of the -d option in the User's Guide.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list