libc - Adopt more linux-friendly basename() and dirname()* Essentially take the FreeBSD basename() and dirname() code, changing the API to be more linux-friendly. This reduces work required in d
libc - Adopt more linux-friendly basename() and dirname()* Essentially take the FreeBSD basename() and dirname() code, changing the API to be more linux-friendly. This reduces work required in dports.* Adjust numerous cases in our base code that assumed the old prototypes and side effects.* The passed-in string pointers are no longer const and can be modified in-place by the functions. The returned value is no longer sometimes dynamically allocated and will instead either return a constant string, a portion of the passed in string, or a modified portion of the passed-in string. The API unfortunately has to be declared to return a char * instead of a const char *, even though it sometimes returns pointers to constant strings. The API is now thread-safe.* The API is still a huge historical mess but at least the ports for the most part assume the above behavior now due to linux doing the same thing.Reviewed-by: multiple people
show more ...
Split EXIT STATUS and DIAGNOSTICS sections in manual pages.Also correct some DIAGNOSTICS -> EXIT STATUS where it described onlythe exit codes.
newgrp(1): Add warning when running newgrp without SETUIDnewgrp is 'disabled' by default due to security concerns. However,trying to use it does not explain the problem.
newgrp(1): update newgrp's man page to explain why it does not work bydefault. Discourage its use even further.
chkey, chpass, enigma, lock, newgrp, pw - Handle NULL return from crypt(3)
Replace all casts of NULL to something with NULL.
Pull WARNS6 into usr.bin/Makefile.inc.Most of usr.bin is marked as WARNS6, so add exceptions in individualMakefiles. Also, remove any warning flags from CFLAGS in those Makefiles.
- Whoops! I missed some from the previous commit. My bad, sorry.Ok'ed by: Joerg@
- Check the return value of setenv(). We should check this value since setenv() uses both malloc and realloc.
- Import newgrp(1) from FreeBSD- Add WARNS?= 6Ok'ed by: Joerg