Commit Graph

859 Commits

Author SHA1 Message Date
dwmalone
0379e0b3d7 If syslog fails to talk to syslogd, then it tries to write a message
to the console in a final attempt to log something. Make this final
attempt non-blocking so that a blocking console doesn't end up
blocking process which attempt to syslog something.

In particular, this means you should be able to su and fix the
problem if the console becomes blocking.

MFC after:	3 weeks
2002-03-09 11:38:01 +00:00
dd
247e6b16ee This API will appear in FreeBSD 4.6. 2002-03-09 05:19:21 +00:00
dd
69772af884 Bring a comment in line with the code, and fix some spelling errors
while I'm here.

PR:		35394
Submitted by:	andrew@ugh.net.au
2002-03-09 04:00:53 +00:00
green
fa8475a7f6 Fix build. I commented out getpass() in readpassphrase.c because the
implementation did not match our manpage description (i.e., it could
return NULL).  I mistakenly thought we were still using getpass.c
because, for some reason, CVS never removed it from the tree.

Pointy hat received from:	alfred
Kick in the groin to:	CVS
2002-03-09 03:16:41 +00:00
green
e81a222988 Update readpassphrase(3)to the latest revisions. Changes are mainly due
to return value constraints now changing as well as more intelligent
handling of signals.

Obtained from:	OpenBSD
2002-03-08 21:14:00 +00:00
green
965906f60d Add new errno ``ENOATTR''. 2002-03-07 15:13:44 +00:00
dd
c8a6bd9922 Introduce a version field to `struct xucred' in place of one of the
spares (the size of the field was changed from u_short to u_int to
reflect what it really ends up being).  Accordingly, change users of
xucred to set and check this field as appropriate.  In the kernel,
this is being done inside the new cru2x() routine which takes a
`struct ucred' and fills out a `struct xucred' according to the
former.  This also has the pleasant sideaffect of removing some
duplicate code.

Reviewed by:	rwatson
2002-02-27 04:45:37 +00:00
alfred
a375f90225 use _GENERIC_DIRSIZ(dp) to avoid copying too much of the dirent over
the user supplied buffer.  this can be a problem when the user doesn't
supply a full dirent and we corrupt their memory.
2002-02-26 21:39:32 +00:00
sobomax
c70d19ad22 Per POSIX <grp.h> doesn't require <sys/types.h>.
Submitted by:	ache
2002-02-25 17:20:40 +00:00
imp
60cc340d82 Fixed divots that I created when I moved prototypes of group_from_gid
and user_from_uid to grp.h and pwd.h.  Update the man pages.

Submitted by: David Malone
Pointy hat to: imp
2002-02-19 00:05:59 +00:00
imp
6b64a7550c Use new-style function declations. 2002-02-13 09:30:47 +00:00
ru
3c39931603 FreeBSD 4.1 bootstrapping aid (__FBSDID is not there). 2002-02-08 09:34:17 +00:00
sobomax
0a68f500fa Allow ldd(1) be used on shared libraries in addition to executables. 2002-02-04 10:33:48 +00:00
bde
bcd12df5f0 Fixed tab lossage in vendor id and nearby style bugs in previous commit. 2002-02-01 23:26:32 +00:00
bde
986de447b0 Fixed syntax error in previous commit. It was non-fatal because it was
in conditional code that happens not to be compiled, and because gcc
doesn't complain garbage after #endif by default.

Fixed some style bugs in previous commit, 1.8 and 1.1.
2002-02-01 23:16:39 +00:00
obrien
3a4c556593 Fixed slipage in editor. 2002-02-01 07:26:00 +00:00
obrien
a16458e33c Cut-n-paste in `list' mode considered harmful. 2002-02-01 07:25:07 +00:00
obrien
b45ff0fb56 * Remove __P and convert to ANSI prototypes.
* Remove 'register'.  (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:32:19 +00:00
obrien
21d62aab61 * Remove 'register'. (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:08:48 +00:00
obrien
675250e8eb Fix SCM ID's. 2002-02-01 00:57:29 +00:00
obrien
fce7c0dfb2 Fix minor style nit. 2002-01-31 17:26:37 +00:00
bde
6f84f53a9e Fixed world breakage due to missing include of <sys/cdefs.h> in previous
commit.

Fixed related style bugs:
basename.c: misplaced '#if 0'
dirname.c: misplaced '#if 0'
getgrent.c: missing '#if 0', and tab lossage in vendor id (the previous
            commit fixed the complete corruption of the vendor id but
	    lost a tab)
getpwent.c: missing '#if 0'
2002-01-31 12:58:36 +00:00
obrien
816c4086cb Fix FreeBSD IDs. 2002-01-30 21:36:57 +00:00
dwmalone
23683c4a1c Use ctime_r to build the timestamp for syslog, so that we don't
clobber a ctime buffer which is passed in.

PR:		34022
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
MFC after:	2 weeks
2002-01-25 21:49:34 +00:00
ru
0d2b999d27 The sixth argument to the NET_RT_IFLIST sysctl is actually 0 for
all interfaces, and ifnet.if_index value for a single interface.
2002-01-23 12:48:08 +00:00
markm
e2a2029185 Use the proper type (gid_t) for (group)->gr_gid to be orthogonal
with uid_t usage and (user)->pw_uid.

PR:		3242
2002-01-22 17:32:53 +00:00
ru
127a9d6012 mdoc(7) police: tidy up OpenBSD fixes. 2002-01-16 15:21:39 +00:00
ru
7aa3bf6364 yp(4) -> yp(8).
PR:		docs/30797
2002-01-14 16:59:03 +00:00
cjc
840adbd42c Merge some updates and markup fixes from OpenBSD. This is mainly
motivated by the new "CAVEATS" section.

Inspired by:	alfred noting NetBSD's merging OpenBSD's changes
Obtained from:	OpenBSD
2002-01-14 02:08:02 +00:00
deischen
732c36b4f3 Include <stddef.h> to fix build problem when namespace pollution
by <signal.h> (including <time.h> so that NULL is accidentally defined)
is removed.

Style nits.

Submitted by:	bde
2002-01-11 19:46:08 +00:00
bde
6c6aee2cdc Fixed missing backslash in previous commit. 2002-01-11 16:08:49 +00:00
bde
db24453e8e Fixed accumulated unsorting and some other style bugs (long lines). 2002-01-11 15:59:30 +00:00
deischen
e1f74be694 Add getcontext, setcontext, makecontext, and swapcontext. These
functions are defined in SUSv2 and the latest POSIX spec.

Thanks to Bernd Walter <ticso@cicely8.cicely.de> for helping debug my
alpha assembly.

Approved by:	-arch
2002-01-10 02:40:59 +00:00
ru
8ed2558536 If the OID is missing, sysctl(3) returns ENOENT, not EOPNOTSUPP.
PR:		docs/32793
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
2001-12-13 10:59:00 +00:00
ru
7d7100de9d Start using .St macro for POSIX.1-2001. 2001-12-08 19:06:23 +00:00
des
2a531b06f9 Correct some egregious style bugs. 2001-12-04 12:32:35 +00:00
des
48c3a59cf5 Add a missing error check. This fixes a bug that would cause pwd_mkdb to
dump core if invoked with an input file that looks like a password file
but isn't (e.g. /etc/group).

PR:		32378
Submitted by:	Maxim Konovalov <maxim@macomnet.ru>
MFC after:	1 week
2001-12-04 12:31:02 +00:00
tobez
0ec82ca958 Fix typos getpeerid -> getpeereid.
PR:		docs/32442
Reviewed by:	dd
2001-12-02 23:50:40 +00:00
jkoshy
91903d036d Add support for sysconf(_SC_NPROCESSORS_CONF) and sysconf(_SC_NPROCESSORS_ONLN).
This API is supported in SVR4.0MP, Solaris, Linux, AIX and Tru64 Unix.

PR:		bin/27489
Submitted by:	Arun Sharma <arun@sharma-home.net>
Reviewed by:	bde (prior version)
2001-12-01 12:07:42 +00:00
tobez
390c9f0f6e Do not write warning messages on stderr - a caller is expected to check
the return code and errno instead.  Those warnings did not do any good
for daemonized users of initgroups(3), and confused cvs clients that
communicated with non-root cvs pserver.

The committed fix differs from the one suggested in the PR, and was
submitted by ru.

PR:		15421
Approved by:	markm
Discussed on:	-stable, -current at various times
2001-11-28 10:55:02 +00:00
ru
c6fd839478 mdoc(7) police: markup cleanup. 2001-11-22 11:17:58 +00:00
ru
46ad89b6ed mdoc(7) police: add missing comma. 2001-11-22 09:48:54 +00:00
fjoe
2ffd6edcd1 fix compilation (include -> #include) 2001-11-21 20:40:21 +00:00
green
371c8a0a71 Should also include namespace.h
Submitted by:	ru
2001-11-21 15:33:40 +00:00
green
6c0292d0cd Change certain syscalls from x to _x.
Prodded by:	bde
2001-11-21 14:44:52 +00:00
green
0deda355ca Introduce readpassphrase(3), a superset of getpass(3). This
comes originally from Todd Miller.

Obtained from:	OpenBSD
2001-11-20 15:15:42 +00:00
ru
c6b45ef12b mdoc(7) police: remove whitespace at EOL. 2001-11-20 13:43:58 +00:00
dd
a4f22e24f9 Create link from directory.3 to readdir_r.3.
PR:		32028
Submitted by:	andrew@ugh.net.au
2001-11-16 15:49:38 +00:00
bde
eb58f0f1a8 Fixed namespace pollution related to `err' in libc in the same way as for
`warn'.  Now a whole 2 members of the err() family don't cause pollution.

This fixes world breakage in awk for NOSHARED worlds. contrib/awk/msg.c
has had its own version of err() for a long time, but this somehow
didn't cause problems until the update to awk-3.1.0.
2001-11-11 02:48:09 +00:00
dwmalone
c54bcb1109 Add a note explaining why CLOCKS_PER_SEC isn't 1000000.
While I'm here, "of a second" does not belong to CLOCKS_PER_SEC.

PR:		30297
Submitted by:	Bernd Luevelsmeyer <bdluevel@heitec.net>
2001-11-05 21:30:43 +00:00