code that assign a u_int value to x_handy. However, this means
that we need to be careful checking for overflow as we can no longer
subtract a value and check the result for < 0. We reorder the
expression instead to avoid this problem (basic algebra).
deraadt@ OK
it is not the fist character of optstring (since that would conflict
with GNU semantics).
Update the bit on "W;" within optstring when called as getopt (not
getopt_long) to current reality.
o Check for long options even when not at the beginning of an option.
For instance, if -a is a short option w/o an arg and -static is a
boolean long option then -astatic is valid for getopt_long_only().
o If a potential long argument does not match longopts and the first
character is not a short option, print a warning and skip the rest
of the argument.
Also clean up some trailing whitespace and change return value of
parse_long_options() from -2 to -1 when unmatched and in long_only mode.
With these fixes the binutils ld seems happy with our getopt_long_only()
In order for getopt_only_only() to work we need to check for long
options before short ones. I have merged getopt_internal and
getopt_long_internal into a single function with the actual long
args parsing broken out into a separate function.
This also simplifies the flow of control.
getopt_long_only(). At some point this should replace the BSD
getopt(3) but we are not there yet.
While I am here add protection from the multiple getopt() definitions
due to conflicting standards.
now build libraries with propolice enabled. Without this, existing
binaries (such as ports/packages) that link with any system library
other than libc will fail with an undefined symbol of "___guard"
(__guard on ELF).
Pointed out by markus@ and discussed with deraadt@
group. This changes getpw* to always try the shadow db first and
then fall back to the db w/o password hashes. In the future,
/usr/libexec/auth/login_passwd (and others) will be setgid shadow
instead of setuid root. OK deraadt@
If you track -current you should do the following:
o add group shadow to /etc/group
o chgrp shadow /etc/spwd.db
o chmod 640 /etc/spwd.db
o rebuild and install src/usr.sbin/pwd_mkdb
You do not need to rebuild libc yet, but it would't hurt to do so.