X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 23 Mar 2009 21:41:18 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: [1.7] passwd: useless if used with a logged on domain user Message-ID: <20090323204118.GY9322@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20090321101004 DOT GU9322 AT calimero DOT vinschen DOT de> <20090322100907 DOT GA9322 AT calimero DOT vinschen DOT de> <20090322192205 DOT GH9322 AT calimero DOT vinschen DOT de> <20090323145958 DOT GS9322 AT calimero DOT vinschen DOT de> <20090323164003 DOT GX9322 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/