| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
lock file" would trash errno, creating confusion.
One instance found by richardipsum@fastmail, other two identified from
original commit
ok millert
|
|
|
|
|
|
|
|
| |
of the pointer returned by getpw{ent,nam,uid}(). We unmap the
buffer each time to catch callers using a stale passwd struct
pointer. As a special case, we do not unmap the buffer if the
previous lookup was for the same name or uid. This special case
may be removed in the future. OK deraadt@
|
|
|
|
|
|
| |
via the _shadow functions will open now, preventing some programs running
as root from accidentally loading password hashes it into their memory.
ok deraadt
|
|
|
|
| |
ok and valuable input from millert@
|
|
|
|
|
|
|
|
|
| |
YP lock file unconditionally. This hints to the kernel that a "getpw"
operation is happening, even in the non-YP case. This looks like a
gruesome hack, but helps refine the ways these functions are called
and mandates the right pledge requests. Once the tree is fully annotated
we will know better how to improve the backing store management.
ok semarie espie beck
|
|
|
|
|
|
|
| |
libc to avoid reusing the static buffers returned by the non-reentrant
versions. Since this is inside libc we can use constants for the
buffer sizes instead of having to call sysconf().
OK guenther@ deraadt@
|
|
|
|
|
|
|
|
|
| |
This version of the function will always open the secure/shadow/master
password files. Soon, the regular variants of these functions will not.
(Intermixing shadow and regular gets a little weird; don't do that.)
Not using struct spwd and getspwnam functions to reduce churn in callers.
Should just be a one line diff in most places.
ok deraadt
|
|
|
|
| |
ok semarie
|
|
|
|
| |
Hide bcrypt_autorounds(), prefixing with an underbar for static builds.
|
|
|
|
|
| |
is non-portable. Also add missing asprintf() return value checks.
OK deraadt@ guenther@ doug@
|
|
|
|
| |
review by millert, binary checking process with doug, concept with guenther
|
|
|
|
|
|
|
|
|
|
| |
errno; they might do so on open() and close() failures, but by POSIX,
they are not supposed to fail. Note that ignoring failures inside
setgrent() does not matter, the following getgrent() is bound to
fail the same way again, anyway. If you insist on detecting open()
failure, use setgroupent(), even though that is less portable.
While here, remove two pointless (void) casts.
ok millert@ jca@
|
|
|
|
|
|
|
| |
error occurs, but of course they do return the error. This matches
what getgr{nam,gid}_r() have already been doing. Original idea
by kettenis@, and deraadt@ called that idea "the only sane approach".
ok kettenis@ millert@
|
|
|
|
|
|
| |
Prevent close(2) and syslog(3) from stomping on errno; from guenther@.
Set ERANGE if the buf is too small, required by POSIX; from jca@.
ok millert@
|
|
|
|
|
|
|
|
| |
and getgrgid_r() to agree with POSIX. Not touching errno handling
yet, which will also need fixing.
Problem originally reported by william at 25thandClement dot com on bugs@.
OK sthen@, and kettenis@ agrees it's "a step in the right direction".
|
|
|
|
|
|
|
| |
setpassent(stayopen).
Bug found and fixed by Erik Lax <erik-AT-halon-DOT-se>
ok millert@ guenther@
|
| |
|
|
|
|
| |
a struct passwd. ok deraadt@ guenther@ kettenis@
|
| |
|
|
|
|
|
| |
spotted by Ilja Van Sprundel
ok millert
|
|
|
|
|
|
|
| |
that errno isn't changed when a normal user (who can't open spwd.db)
does a lookup.
Problem pointed out by Tim van der Molen (tbvdm at xs4all.nl)
|
|
|
|
| |
ok deraadt@
|
|
|
|
| |
of a false positive made by parfait; ok millert
|
|
|
|
|
|
|
|
| |
YP group(5) exclusion, i.e. support -groupname:*:: in /etc/group.
Such groups will be excluded from later +:*::,
in just the same was as it is already done for passwd(5).
I have been running this since the autumn of 2008.
Discussed with several (including deraadt@, millert@, jmc@).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
contains a matching entry, use that and refrain from accessing YP.
getpwnam/getpwuid: If YP is #defined and /etc/master.passwd(5) contains
a matching entry before the first YP entry, use that and stay away from YP.
Taken together, this allows a solution to the following problem pointed
out by deraadt@: When YP was configured but temporarily unavailable, even
root login would block, hindering you when trying to do repairs.
To avoid this, you can now provide a static entry for root in /etc/netid.
Using suggestions from miod@ otto@ blambert@ jmc@.
"commit" deraadt@, "cool" ajacoutot@, "looks fine" jmc@.
|
|
|
|
|
|
| |
happened only in the case of a + record indicating to use YP, but with ypbind
not actually running. Problem found by pyr; solution found with millert
ok millert pyr
|
|
|
|
| |
found by alexander.schrijver
|
|
|
|
| |
the buffer size. OK deraadt@
|
|
|
|
| |
entire file. much help from kurt, and tested by many
|
|
|
|
|
|
| |
Kill old files that are no longer compiled.
okay theo
|
| |
|
|
|
|
| |
ok millert@
|
| |
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
|
|
| |
millert@ ok
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
a case of bad caching; peter and I
|
| |
|
|
|
|
| |
errors reasonably and deal correctly with unsigned quantities.
|
| |
|