| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Notes:
svn path=/head/; revision=6966
|
| |
|
|
|
|
|
|
|
| |
the copy built from here was overwritten by the other copy and the other
copy was put in library-building command lines twice. ld now objects to
duplicated modules.
Notes:
svn path=/head/; revision=6937
|
| |
|
|
|
|
|
|
|
|
|
|
| |
from the code in strftime.c . This affects both the library code
and all the commands using it (e.g. date +%s).
Note that %s is not required by ANSI, but we've already got it in 1.1.5.1.
Suggested by: luigi@labinfo.iet.unipi.it (Luigi Rizzo)
Notes:
svn path=/head/; revision=6815
|
| |
|
|
|
|
|
|
| |
realpath() still accepts "" as an arg and converts it to a canonical
pathname for the current directory.
Notes:
svn path=/head/; revision=6700
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6693
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
| void
| *signal(int sig, void (*func)(int))
instead of
| void
| *signal(sig, func())
|
| void
| (*func)()
Notes:
svn path=/head/; revision=6681
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6677
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6544
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6538
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6537
|
| |
|
|
|
|
|
|
|
|
| |
in an (unlikely) border case (maxgroups==1 and the user is on
an /etc/group line for the same group and that group only ...).
Now this case is dealt with as before ...
Notes:
svn path=/head/; revision=6536
|
| |
|
|
|
|
|
| |
result of being a member of some group in both /etc/group and YP).
Notes:
svn path=/head/; revision=6530
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6523
|
| |
|
|
|
|
|
| |
specified as uid_t but should be gid_t.
Notes:
svn path=/head/; revision=6511
|
| |
|
|
|
|
|
| |
Submitted by: alex@elvisti.kiev.ua
Notes:
svn path=/head/; revision=6509
|
| |
|
|
|
|
|
| |
Submitted by: alex@elvisti.kiev.ua
Notes:
svn path=/head/; revision=6485
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6471
|
| |
|
|
|
|
|
| |
all over the place.
Notes:
svn path=/head/; revision=6227
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6203
|
| |
|
|
|
|
|
| |
single function.
Notes:
svn path=/head/; revision=6190
|
| |
|
|
|
|
|
|
|
|
|
| |
inode as ".", then just return that. I added a check so it must start with
a '/'.
Reviewed by: phk
Submitted by: bostic@cs.berkeley.edu (Keith Bostic)
Notes:
svn path=/head/; revision=6182
|
| |
|
|
|
|
|
|
| |
<sys/time.h> works because <sys/time.h> includes <time.h> if KERNEL
is not defined, but is ugly.
Notes:
svn path=/head/; revision=6171
|
| |
|
|
|
|
|
|
|
| |
Add a missing apostrophe that suggests inverting the frequency to get
tick size. It read better before because `CLK_TCK' suggests a tick
size although it is actually a frequency.
Notes:
svn path=/head/; revision=6169
|
| |
|
|
|
|
|
|
|
| |
and is not necessarily related to the ANSI CLOCKS_PER_SEC).
Parenthesize macro args.
Notes:
svn path=/head/; revision=6167
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6166
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as an NIS client. The pw_breakout_yp routines that are used to populate the
_pw_passwd structire only do anything if the bits in the pw_fields member
_pw_passwd are cleared. Unfortunately, we can get into a state where
pw_fields has garbage in it right before the YP lookup functions are
called, which causes the breakout functions to screw up in a big way.
Here's how to duplicate the problem:
- Configure FreeBSD as an NIS client
- Log in as a user who's password database records reside only in
the NIS passwd maps.
- Type ps -aux
Result: your processes appear to be owned by 'root' or 'deamon.'
/bin/ls can exhibit the same problem.
The reason this happens:
- When ps(1) needs to match a username to a UID, it calls getpwuid().
- root is in the local password file, so getpwuid() calls __hashpw()
and __hashpw() populates the _pw_passwd struct, including the pw_fields
member. This happens before NIS lookups take place because, by coincidence,
ps(1) tends to display processes owned by root before it happens upon
a proccess owned by you.
- When your UID comes up, __hashpw() fails to find your entry in the
local password database, so it bails out, BUT THE BITS IN THE pw_fields
STRUCTURE OF _pw_passwd ARE NEVER CLEARED AND STILL CONTAIN INFORMATION
FROM THE PREVIOUS CALL TO __hash_pw()!!
- If we have NIS enabled, the NIS lookup functions are called.
- The pw_breakout_yp routines see that the pw_fields bits are set and
decline to place the data retrieved from the NIS passwd maps into the
_pw_passwd structure.
- getpwuid() returns the results of the last __hashpw() lookup instead
of the valid NIS data.
- Hijinxs ensue when user_from_uid() caches this bogus information and
starts handing out the wrong usernames.
AAAARRRRRRRRRGGGGGGHHHHHHHHHH!!!
*Please* don't tell me I'm the only person to have noticed this.
Fixed by having __hashpw() check the state of pw_fields just before
bailing out on a failed lookup and clearing away any leftover garbage.
What a fun way to spend an afternoon.
Notes:
svn path=/head/; revision=6145
|
| |
|
|
| |
Notes:
svn path=/head/; revision=6096
|
| |
|
|
|
|
|
| |
when looking for master.passwd.whatever.
Notes:
svn path=/head/; revision=6095
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- FreeBSD's NIS server can supply a master.passwd map, which has
more fields in it than a standard passwd map, so we need a
_master_pw_breakout() fuction.
- When doing passwd map lookups, look for master.passwd.* by attempting
a _yp_first() on master.passwd.byname. If it exists, we're being served
by a FreeBSD NIS server and we should use this map.
- If we aren't the superuser, retrieve only the standard passwd maps.
If we're being served by a FreeBSD system, then the passwd map has
no passwords in it, and it won't serve us the master.passwd map unless
we're superuser anyway.
There's a small speed hit for the superuser inherent in the check for
the master.passwd map, but this lets us dynamically decide what to do
rather than rely on a non-standard config file somewhere. Since all
of this is bypassed for normal users, they shouldn't notice the
difference.
Notes:
svn path=/head/; revision=6076
|
| |
|
|
|
|
|
| |
reported by MARC Giannoni <marc@cmc.eng.comsat.com>, this fix is by me.
Notes:
svn path=/head/; revision=5964
|
| |
|
|
| |
Notes:
svn path=/head/; revision=5958
|
| |
|
|
|
|
|
|
|
|
|
| |
1) Changed LIB_SCCS and SYSLIB_SCCS to LIB_RCS and SYSLIB_RCS.
2) Changed sccsid[] variables to rcsid[]
3) Moved all RCSID strings into .text
4) Converted all SCCSID's to RCS $Id$'s
5) Added missing $Id$'s after copyright.
Notes:
svn path=/head/; revision=5790
|
| |
|
|
| |
Notes:
svn path=/head/; revision=5789
|
| |
|
|
| |
Notes:
svn path=/head/; revision=5783
|
| |
|
|
| |
Notes:
svn path=/head/; revision=5780
|
| |
|
|
| |
Notes:
svn path=/head/; revision=5714
|
| |
|
|
|
|
|
| |
correctly.
Notes:
svn path=/head/; revision=5707
|
| |
|
|
|
|
|
|
|
|
| |
YP by disallowing `+' entries as logins in all cases. (This handles the
case of a `+' entry in the password file but YP not running, which should
never happen but is easy enough to check for so we'll apply some
prophylaxis.)
Notes:
svn path=/head/; revision=5703
|
| |
|
|
|
|
|
| |
getrusage call.
Notes:
svn path=/head/; revision=5324
|
| |
|
|
|
|
|
|
|
| |
Embalm. Rewrite to do things much the same as gcc-2: use fistpq for speed
and elegance, and mishandle overflow consistently. __fixunsdfsi() is no
longer called by gcc.
Notes:
svn path=/head/; revision=5246
|
| |
|
|
|
|
|
| |
Remove unnecessary .text statement.
Notes:
svn path=/head/; revision=5245
|
| |
|
|
| |
Notes:
svn path=/head/; revision=5244
|
| |
|
|
| |
Notes:
svn path=/head/; revision=5243
|
| |
|
|
|
|
|
|
|
| |
The documentation for mrand48 and lrand48 is mixed up.
mrand48 returns a full 32 bit number, while lrand48 only returns
31 bits.
Notes:
svn path=/head/; revision=5228
|
| |
|
|
|
|
|
|
|
| |
Reviewed by:
Submitted by:
Obtained from: 1.1.5.1 with a few modifictaions.
Notes:
svn path=/head/; revision=5152
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getcwd() has two off-by-one bugs in FreeBSD-2.0:
1. getcwd(buf, size) fails when the size is just large enough.
2. getcwd(buf + 1, 1) incorrectly succeeds when the current directory
is "/". buf[0] and buf[2] are clobbered.
(I modified Bruce's original patch to return the proper error code
[ERANGE] in the case of #2, but otherwise... -DG)
This program demonstrates the bug:
---
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
int main(void)
{
char buf[5];
int errors;
errors = 0;
if (chdir("/tmp") != 0) {
perror("chdir");
abort();
}
if (getcwd(buf, 5) == NULL) {
perror("oops, getcwd failed for buffer size = size required");
++errors;
}
if (chdir("/") != 0) {
perror("chdir");
abort();
}
buf[0] = 0;
buf[2] = 1;
if (getcwd(buf + 1, 1) != NULL) {
fprintf(stderr,
"oops, getcwd succeeded for buffer size = one too small\n");
++errors;
}
if (buf[0] != 0) {
fprintf(stderr,
"oops, getcwd scribbled on memory before start of buffer\n");
++errors;
}
if (buf[2] != 1) {
fprintf(stderr,
"oops, getcwd scribbled on memory after end of buffer\n");
++errors;
}
exit(errors == 0 ? 0 : 1);
}
Notes:
svn path=/head/; revision=5072
|
| |
|
|
|
|
|
|
|
| |
Compare unsigned chars.
Return the place after where the character was found and not the start
of the string.
Notes:
svn path=/head/; revision=5071
|
| |
|
|
|
|
|
|
|
|
|
| |
pointer returned by realloc(). All callers free the pointer if the
execve fails. Nuke the caching. This essentially restores buildargv()
to the 1.1.5 version. Also fix a memory leak if realloc() fails. Also
nuke similar but non-broken caching in execvp(). malloc() should be
efficient enough.
Notes:
svn path=/head/; revision=5070
|
| |
|
|
|
|
|
|
|
|
| |
command available yet.
Changed an entry in getprcent.3 from rpcinfo(8C) to rpcinfo(8).
Changed an entry in getrpcport.3 from 3R to 3.
Changed two entries in rpc.3 from 3N to 3.
Notes:
svn path=/head/; revision=5049
|
| |
|
|
|
|
|
| |
other manpages and there is no conflict.
Notes:
svn path=/head/; revision=5048
|