This is the mail archive of the
mailing list for the Cygwin project.
mkpasswd, mkgroup: __progname points to rubbish
- From: Julio Costa <costaju at gmail dot com>
- To: Cygwin Mailing list <cygwin at cygwin dot com>
- Date: Fri, 2 Oct 2009 11:38:31 +0100
- Subject: mkpasswd, mkgroup: __progname points to rubbish
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 'ÃÂ a --help' for more information.
Note the rubish after "Try". Or, if I do:
$ mkgroup -S--
<Â 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.
The difference is in the 'default' clause of the select statement in
the getopt output handling in main().
In mkgroup.c, argv 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
ÃÂ 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!
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple