uid/gid in question was in the cache, but did not exist
in the password file. This causes the -nouser and -nogroup
options to find(1) to only print the first file owned by
an unknown user/group in some cases.
Use snprintf instead of sprintf to avoid buffer overflows
Use snprintf in uu_lockerr instead of lots of hardcoded constants
and not null-terminated strncpy
Return "" for OK and "device in use" for INUSE, it allows simple
strcpy(buf, uu_lockerr(retcode)) without testing for special OK
case (NULL was there) and obtaining meaningful result for INUSE
("" was there) without special testing for it too.
1) Fix mkdir -p to exit with the proper exit status and issue an error
message if it was unable to create all of the specified directories
and they did not previously exist. POSIX says:
The mkdir utility shall exit with one of the following values:
0 All the specified directories were created successfully or the
-p option was specified and all the specified directories now
exist.
E.g.
% mkdir -p /var/mkdir
mkdir: /var/mkdir: Permission denied
% touch /tmp/file
% mkdir -p /tmp/file/dir
mkdir: /tmp/file: Not a directory
Previously the above examples would exit with a zero exit status
and no error message. Something like the following run as a
normal user will still not produce an error:
% id
uid=629(mpp) gid=629(mpp)....
% mkdir -p /usr/local/etc
% ls -ld /usr/local/etc
drwxr-xr-x 4 bin bin 512 Dec 26 14:55 /usr/local/etc/
2) Cleaned up the mode handling to be more efficient when multiple
directories are being created.
3) Fixed a problem where directories could be created with the wrong mode
if the the -p option was specified and the build() routine returned
and error. It would leave the umask set incorrectly at this point.
4) Removed an unused variable.
Closes PR# 2304.
which don't provide a non-blocking interface.
This is a short term "fix" which changes a half-lose to a half-win.
The thread that accesses a device that does not provide a non-blocking
interface will block for its time slice.
A medium term solution would be to use rfork. A long-term solution
would be some sort of kernel thread/SMP implementation.
a reserved port, so why not the nfs rpc's themselves?
With user allowed mounts, this perhaps needs a closer look, but
on the other hand, a user could already specify the flag.
If normal users should not be able to use resserved ports, the kernel
should check for the flag at mount time.
(presumably because the kernel is old). Moved the declaration of a
variable realated to this sysctl outside of an unrelated ifdef.
Not fixed:
- this sysctl is badly named (nfs occurs twice).
- it's silly to have for FreeBSD in FreeBSD code, especially when
only half of the FreeBSD-dependent code is ifdefed.
The magic number conflicted with the rotting disabled one in ext2fs for
debug.doasyncfree.
Removed messy debugging variable/constant/sysctl debug.doreallocblks.
Lite2 removed it, and we don't use the code that it controls.