This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mkpasswd, mkgroup: __progname points to rubbish


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 'ÃÂ 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.

...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
ÃÂ 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!

-- 
___________
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]