www.delorie.com/archives/browse.cgi | search |
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 <costaju AT gmail DOT com> |
Date: | Fri, 2 Oct 2009 11:38:31 +0100 |
Message-ID: | <af075b00910020338y2f1e12a1n7d00fee7944f4041@mail.gmail.com> |
Subject: | mkpasswd, mkgroup: __progname points to rubbish |
To: | Cygwin Mailing list <cygwin AT cygwin DOT com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |