Commit Graph

143 Commits

Author SHA1 Message Date
John Birrell
5095f1917a Remove the static declaration from the line[] variable to allow
openpty() to be called from a threaded application.
1999-05-24 01:15:28 +00:00
Jean-Marc Zucconi
e1e705c5b5 Chflags was clearing all flags supplied on the command line after a
clearing flag like dump or noschg, etc.

PR:		bin/10071
Submitted by:	Andreas Klussmann <andreas@infosys.heitec.net>
1999-05-21 17:04:13 +00:00
Andrey A. Chernov
121ba32d78 fix potential memory overwrite in escape parsing
PR: 11687
Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>
1999-05-13 16:16:46 +00:00
Tim Vanderhoek
61f74535f6 Change references from "passwordperiod" to "passwordtime", since
"passwordtime" is what passwd(1) has actually been using.  I suspect
passwordperiod was the original intent.  I can't figure-out which,
if either, BSDi uses.  If anyone knows...
1999-04-30 18:19:46 +00:00
Andrey A. Chernov
8a2deaa1de oops, add pwd!=NULL check to previous fix 1999-04-24 17:17:42 +00:00
Andrey A. Chernov
ae70257435 Switch to user UID/GID before checking/reading its ~/.login_conf
- some NFSes have root read access disabled
1999-04-24 17:01:58 +00:00
Andrey A. Chernov
ab39fdb694 add MLINKS for two functions used from login_auth.c
comment out unused functions from login_auth.3
1999-04-24 16:30:30 +00:00
Brian Somers
d746fb6643 If given host.domain:nn[.nn], trimdomain() now reduces it to
host:nn[.nn] (if the domain is the same as the local one).
1999-04-09 01:54:10 +00:00
Brian Somers
c1df83d996 bcopy -> memmove
Suggested by: archie
1999-04-08 08:00:06 +00:00
Brian Somers
0c059599f6 Tidy up trimdomain() and document it.
Don't truncate one byte short of the passed length.
1999-04-07 14:03:31 +00:00
Brian Somers
5b3f0a74e1 Handle hostnames up to MAXHOSTNAMELEN-1 in length.
Use bcopy() instead of strcpy() to handle potentially
overlapping regions.
Un-obscure/complicate some code.
1999-04-07 08:27:04 +00:00
Brian Somers
bc19c8517d Put parenthesis around sizeof args.
Allow for host names up to MAXHOSTNAMELEN - 1 in length.

Prompted by: bde
1999-04-07 08:26:50 +00:00
Brian Somers
595f220e04 Add realhostname() - a function to correctly lookup
a name by address and ensure that the name resolves
back to the original address.
1999-04-06 23:02:35 +00:00
Brian Somers
3c42a9c08a Get the pid right if a stale lock file exists.
PR:	10531
Submitted by: Lawrence D. Lopez <lopez@cisco.com>
1999-03-11 09:09:20 +00:00
Bruce Evans
19ee2ea58c Fixed bitrot in synopsis (some const poisoning had not reached here). 1999-03-05 17:08:23 +00:00
Alexander Langer
43d1df332e Removed occurrences of consecutive repeated words (such as "the the"). 1999-02-12 02:12:08 +00:00
Bruce Evans
8495e302f6 Declare setproctitle() as printf0-like. 1998-12-16 17:52:15 +00:00
Bruce Evans
d529713846 Adjust for kern.ps_strings and PS_STRINGS not being a pointer. This is
an unimprovement here.  I thought it would be an improvement, as in libkvm,
but here we can access the strings directly.

Use sysctlbyname() instead of sysctl() and trust it to give a nonzero
address if it succeeds.
1998-12-16 17:34:05 +00:00
Matthew Dillon
0e31b6b580 oops. Fix indentation of the 'for' loop I just added. 1998-12-13 01:39:32 +00:00
Matthew Dillon
f16d2ab2d3 Handle the race condition where vipw may lock a password file which has
just been replaced.  After our lock succeeds we check if st_nlink is 0
    and if it is we close the descriptor and retry our open/lock sequence.
1998-12-13 01:36:45 +00:00
Jordan K. Hubbard
efbcb4ae03 Better document the file format, add in support for nested {}'s in multi-line
property values.
1998-11-22 13:20:09 +00:00
Dag-Erling Smørgrav
4da8edd59e Since vfork() was changed to fork(), we have to pass errno back from the
child to the parent somehow.

PR:		8353
Submitted by:	Andrew J. Korty <ajk@purdue.edu>
1998-10-20 11:34:11 +00:00
Jordan K. Hubbard
eed80d041b correct prototype. 1998-10-14 11:04:36 +00:00
Dag-Erling Smørgrav
1fd98d7d88 Calls one or more of malloc(), warn(), err(), syslog(), execlp() or
execvp() in the child branch of a vfork(). Changed to use fork()
instead.

Some of these (mv, find, apply, xargs) might benefit greatly from
being rewritten to use vfork() properly.

PR:		Loosely related to bin/8252
Approved by:	jkh and bde
1998-10-13 14:52:33 +00:00
Jordan K. Hubbard
8b1ef8d464 Now take stdio.h out of files that don't require it. 1998-10-09 11:24:20 +00:00
Jordan K. Hubbard
475ae25ac1 Update docs to match interface change. 1998-10-09 07:33:58 +00:00
Jordan K. Hubbard
50dfa596d3 o move path in libutil.h to paths.h
o make property_read() take a fd instead to avoid stdio.h mess
o update auth to new interface.
1998-10-09 07:32:38 +00:00
Jordan K. Hubbard
72671863e8 Take the path spec back out. 1998-10-09 07:28:14 +00:00
Jordan K. Hubbard
b8c11ec197 All these have to include stdio.h now. 1998-10-09 00:39:09 +00:00
Jordan K. Hubbard
146c3cf45c remove stdio.h include; I forgot Bruce's cardinal rule that header files
shouldn't include other ones (which, unfortunately, is also a hellish
rule since he broke interfaces like sysctl this way by requiring undocumented
header files to be included just in order to be able to use them now - SIGH!).
1998-10-08 23:10:41 +00:00
Jordan K. Hubbard
3b29c89296 Add some rudimentary documentation for my new functions. 1998-10-08 06:53:32 +00:00
Jordan K. Hubbard
69761016be Correct a build error that got past my build test somehow. 1998-10-08 01:56:49 +00:00
Jordan K. Hubbard
b704025f3c Add a simple mechanism for reading property lists from files (which
I'll convert sysinstall to use shortly) and a simple call which uses
this mechanism to implement an /etc/auth.conf file.  I'll let Mark Murray
handle the format and checkin of the sample auth.conf file.
Reviewed by:	markm
1998-10-07 17:32:49 +00:00
Warner Losh
e8420087b0 Replace memory leaking instances of realloc with non-leaking reallocf.
In some cases replace if (a == null) a = malloc(x); else a =
realloc(a, x); with simple reallocf(a, x).  Per ANSI-C, this is
guaranteed to be the same thing.

I've been running these on my system here w/o ill effects for some
time.  However, the CTM-express is at part 6 of 34 for the CAM
changes, so I've not been able to do a build world with the CAM in the
tree with these changes.  Shouldn't impact anything, but...
1998-09-16 04:17:47 +00:00
Andrey A. Chernov
9f3a9c3a18 Print uid/gid as u_long per bde suggestion 1998-07-29 14:05:01 +00:00
Andrey A. Chernov
e8f9ae6c6e cast arg to (long) to match format 1998-07-28 01:30:16 +00:00
Brian Somers
6c78a7b0e8 Cast pid_t to int for sprintf.
Pointed out by: Charlie Sorsby <crs@hgo.net>
1998-06-10 00:16:28 +00:00
Joseph Koshy
9c727d2ca9 Spelling corrections.
PR: 6868
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-06 05:50:53 +00:00
Andrey A. Chernov
15af1c9b5d Add missing uu_lock_txfr() prototype 1998-06-05 08:21:33 +00:00
John Birrell
ac4898ab0d If using NetBSD syscalls the rtprio syscall doesn't exist, so just
don't try to use it to set special priorities.
1998-06-03 08:12:00 +00:00
Atsushi Murai
89caae2932 Trim a domain part for wtmp as same as showed by "netstat -r".
Here is a some example for avoiding a confusion.

 It asssumes a logged host domain is "spec.co.jp". All
example is longer than UT_HOSTNAMELEN value.

   1) turbo.tama.spec.co.jp: 192.19.0.2  -> trubo.tama
   2) turbo.tama.foo.co.jp : 192.19.0.2  -> 192.19.0.2
   3) specgw.spec.co.jp    : 202.32.13.1 -> specgw

Submitted by:	Atsushi Murai <amurai@spec.co.jp>
1998-06-01 08:47:04 +00:00
Brian Somers
46cf264a26 Add uu_lock_txfr() to transfer ownership of a successful
uu_lock() to another process.
1998-05-28 23:17:09 +00:00
Steve Price
e172f0e587 Allow setting of idle or realtime processing priorities per
login class.

PR:		6636
Submitted by:	Jason Young <doogie@forbidden-donut.anet-stl.com>
1998-05-25 03:55:23 +00:00
David Greenman
ec3a3b4594 Oops, revert part of a diff that wasn't supposed to have been committed. 1998-04-28 07:02:33 +00:00
David Greenman
214bed53a2 Cache the results of the ps_strings sysctl so that it doesn't have to be
redone for every call of setproctitle().
1998-04-28 06:59:14 +00:00
Bruce Evans
6b20a4e1b1 Fixed function types in synopsis.
Commented out docmentation of nonexistent authenticate() and
auth_timesok().  authenticate() seems to be obsolete and
auth_timesok() never existed in FreeBSD.
1998-03-23 13:29:49 +00:00
Philippe Charnier
a5941fc2aa .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
Bill Fenner
15b873cc56 Change tty-related capability names to match the implementation ("ttys.",
not "tty.").
1998-02-21 23:29:59 +00:00
Jordan K. Hubbard
24b687b8de MF22: add login_auth.3 to man page list. 1998-02-18 05:29:07 +00:00
Steve Price
b916ff7fcc Correctly document h and m modifiers to the time format.
PR:		5739
Submitted by:	Matthew Cashdollar <mattc@rfcnet.com>
1998-02-14 16:12:53 +00:00