X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 From: Julio Costa Date: Fri, 2 Oct 2009 11:38:31 +0100 Message-ID: Subject: mkpasswd, mkgroup: __progname points to rubbish To: Cygwin Mailing list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Note-from-DJ: This may be spam Hi, In last cygwin beta: $ uname -a CYGWIN_NT-5.2 VFPT-ITSECVMT 1.7.0(0.212/5/3) 2009-09-11 01:25 i686 Cygwin If I do (obviously found by mistake): $ mkpasswd -n 0 mkpasswd: unknown option -- n Try '=C3=8C=C2=A8 a --help' for more information. Note the rubish after "Try". Or, if I do: $ mkgroup -S-- <=C2=AA a: Only one character allowed as domain\user separator character. Rubbish. But when I do: $ mkgroup -n 0 mkgroup: unknown option -- n Try 'mkgroup --help' for more information. ...OK! The difference is in the 'default' clause of the select statement in the getopt output handling in main(). In mkgroup.c, argv[0] is used; in mkpasswd.c, it's __progname. Several other places with error conditions are using __progname, and the problem is identical. another example: $ mkpasswd -p idiot/path =C3=8C=C2=A8 a: 'idiot/path' is not a fully qualified path. So, I currently don't know WHY __progname it's apparently non-initialized. If it is obvious for you, I'll stop right here. If you'd like that I dig more deeper, please say so! --=20 ___________ Julio Costa -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple