jhb
c02890da0b
Put back the openpty(3) and ptsname(3) fixes but don't disable ptsname(3)
...
on pts(4) devices this time. This fixes the issues while leaving pts(4)
enabled on HEAD.
2008-01-15 15:36:23 +00:00
cperciva
2f49f42d98
Back out last commit, since it accidentally broke pts.
...
The security fix will be re-committed soon, hopefully without breaking
anything.
2008-01-15 13:59:13 +00:00
jhb
db1781cf23
Update the manpage for openpty(3) to account for the recent fixes.
...
Specifically, remove the BUGS section and note that openpty(3) now always
does the various security-related steps. Also, update the error return
value section. The PR below is for the original bug rather than the doc
updates.
MFC after: 1 week
PR: bin/9770
2008-01-14 23:49:56 +00:00
cperciva
533f13b8b2
Fix issues which allow snooping on ptys. [08:01]
...
Fix an off-by-one error in inet_network(3). [08:02]
Security: FreeBSD-SA-08:01.pty
Security: FreeBSD-SA-08:02.libc
2008-01-14 22:56:05 +00:00
jhb
03594bb79f
Invoke revoke(2) on the slave pty in the pts(4) case (new_openpty()) to
...
kick off any other users on the device line before using it since
openpty(3) is documented to do this. Note that grantpt(3) does not
call revoke(2), it only adjusts permissions and ownership.
MFC after: 3 days
2007-12-20 21:10:06 +00:00
jhb
3c82b6a5c7
Bump up the number of ttys supported by pty(4) to 512 by making use of
...
[pt]ty[lmnoLMNO][0-9a-v].
MFC after: 3 days
Reviewed by: rwatson
2007-11-19 20:49:42 +00:00
jb
1897d44373
Constify the first argument to expand_number() so that it can
...
be called with a const without the compiler grisling.
2007-11-18 02:20:02 +00:00
simon
15a00681b7
Minor mdoc cleanup: Every sentence should start on its own line.
2007-10-13 11:09:45 +00:00
kib
6a0967dff6
When pidfile is already locked and has zero length, do not return
...
success and zero pid from pidfile_read(). Return EAGAIN instead. Sleep
up to three times for 5 ms while waiting for pidfile to be written.
mount(8) does the kill(mountpid, SIGHUP). If mountd pidfile is truncated,
that would result in the SIGHUP delivered to the mount' process group
instead of the mountd.
Found and analyzed by: Peter Holm
Tested by: Peter Holm, kris
Reviewed by: pjd
MFC after: 1 week
2007-10-12 10:38:05 +00:00
obrien
4657f1f225
Adjust history.
...
Approved by: re(ken)
2007-09-28 15:31:44 +00:00
pjd
cdecabb273
- Fix strange for loop.
...
Reported by: phk
- While here, check the unit before calculating the actually number.
This way we can return EINVAL for invalid unit instead of ERANGE.
Approved by: re (kensmith)
2007-09-05 14:27:13 +00:00
pjd
7002fe2c1f
Point expand_number(3) at humanize_number(3) and nive versa.
...
Suggested by: trhodes
Approved by: re (kensmith)
2007-09-05 14:25:16 +00:00
pjd
cc12b6df61
Implement expand_number(3), which is the opposite of humanize_number(3), ie.
...
a number in human-readable form is converted to int64_t, for example:
123b -> 123
10k -> 10240
16G -> 17179869184
First version submitted by: Eric Anderson <anderson@freebsd.org>
Approved by: re (bmah)
2007-09-01 06:19:11 +00:00
des
28682dd29a
Back out previous commit until I figure out why my regression test fails.
...
Approved by: re (kensmith)
2007-08-03 09:20:28 +00:00
des
3cfbe77a3e
Use fcntl(2)-style locks instead of less-portable flock(2)-style locks.
...
Approved by: re (kensmith)
2007-08-03 06:32:45 +00:00
yar
31192e1f32
Document the quirks of ~/.login_conf and LOGIN_MECLASS.
2007-06-14 09:33:37 +00:00
yar
aece401e56
Improve mdoc(7) markup.
2007-06-14 07:31:59 +00:00
yar
9790f8d691
Update some comments, mostly regarding LOGIN_MECLASS and ~/.login_conf.
2007-06-14 06:42:49 +00:00
des
7e2e8064f7
Nit: avoid shadowing truncate(2) with a local variable.
2007-05-23 12:09:33 +00:00
des
aac7a2ca82
Fix stupid braino in previous commit.
2007-05-23 10:06:03 +00:00
des
253a9fb8b6
If (flags & O_TRUNC), don't truncate the file until we've successfully
...
locked it.
MFC after: 3 weeks
2007-05-23 08:12:34 +00:00
deischen
ff36458e08
Bump library versions in preparation for 7.0.
...
Ok'd by: kan
2007-05-21 02:49:08 +00:00
des
719c87d1ee
strlcpy() may be faster than snprintf(), but it is less portable, and this
...
is not performance critical code anyway. Also, avoid using strlen() to
obtain information which we already have.
MFC after: 3 weeks
2007-05-11 11:10:05 +00:00
des
4503779c68
Fix typo.
...
Submitted by: Bård Skaflestad <bardsk@math.ntnu.no>
2007-05-10 18:15:30 +00:00
des
ced6c23397
Well gag me with a spoon... I'm so used to working at high WARNS levels
...
that I make stupid fundamental mistakes like this when I don't.
2007-05-10 15:01:42 +00:00
des
2c5ccfbba9
Remove superfluous unexpanded RCS tag.
2007-05-10 14:56:07 +00:00
des
82f6d6455d
Use flopen(3).
...
MFC after: 3 weeks
2007-05-10 14:54:53 +00:00
des
50d71f5464
DTRT when O_NONBLOCK is specified.
...
MFC after: 3 weeks
2007-05-10 14:52:57 +00:00
des
5d25ea6b62
I'm tired of seeing this done incorrectly and non-portably, so add a
...
flopen(3) function which reliably opens and locks a file.
MFC after: 3 weeks
2007-05-10 14:43:31 +00:00
yar
1008fb2fea
Fix one kind of style(9) bug and a typo in a comment.
...
Tested with: md5(1)
2007-05-01 18:50:33 +00:00
imp
130ae175fc
Remove California Regent's clause 3, per letter
2007-01-09 01:02:06 +00:00
trhodes
444451185b
Fix a typo: "the give login class" to "the given login class."
...
PR: 75577
Submitted by: Nobuyuki Koganemaru
2006-11-05 19:00:08 +00:00
ru
c23de2fec8
Fix markup in previous revision.
2006-10-10 08:15:08 +00:00
trhodes
f19a940255
Add information on how to escape a literal colon in a value or name.
...
PR: 101262
2006-10-09 22:35:02 +00:00
ru
81bed6b884
Revise markup in recently added manpages.
2006-09-30 10:34:13 +00:00
ru
f4eec08060
Markup fixes.
2006-09-17 21:27:35 +00:00
thomas
e5de30ab6d
Minor comment fix.
2006-09-08 08:14:32 +00:00
thomas
2bf8d53a14
(pw_copy): Handle the case of a malformed line in master.passwd
...
(copy it silently, do not dereference NULL pointer).
PR: bin/102848
Reviewed by: security-officer (cperciva)
MFC after: 1 week
2006-09-04 15:09:21 +00:00
yar
7815d31aea
Recognize the existence of auth' and
auth-type'
...
capabilities but tell they do nothing in the base system.
This is a late responce to
http://docs.freebsd.org/cgi/mid.cgi?ED759F1DC5ADD74592DD063B1EDEDAF803ACD2B5
.
Obtained from: OpenBSD (wording; with minor corrections)
2006-08-23 09:54:46 +00:00
yar
c6e8412606
style.Makefile(5) is good for our eyes.
2006-07-27 12:36:46 +00:00
imp
5d17f2bbe1
Note the convention that humanize_number follows.
...
Add 'engineering' numbers to table.
2006-07-15 20:53:36 +00:00
maxim
9db24c22ff
o Add missed comma, xref kld(4).
2006-07-12 14:33:52 +00:00
brian
b33fcf8840
Remove some unused variables
2006-06-23 01:42:03 +00:00
maxim
3c4a758003
o Typo: ownship -> ownership.
...
Obtained from: DragonFlyBSD
2006-06-17 07:25:58 +00:00
akiyama
f9f3be843b
Specify default path for SHLIBDIR before bsd.own.mk does.
...
This fix shared library installed correct place.
2006-06-11 09:14:06 +00:00
delphij
1489501378
Don't build IPv6 support if we have choosen not to have it.
2006-06-09 18:11:29 +00:00
delphij
43da20f970
- Add include for libutil.h and string.h for prototype.
...
- Cast the rvalue to be compared with the result of
strlen() to size_t.
2006-05-25 04:01:04 +00:00
ume
2d16d1ab8e
Bump library majro version for gethostbyaddr(3).
2006-05-21 15:15:21 +00:00
brueffer
7ea2a54c0b
Document how the backoff delay is calculated.
...
Submitted by: markus
MFC after: 3 days
2006-04-19 17:46:27 +00:00
jmg
a2a4e2db32
use pwrite to always write at the begining of the file.. If multiple calls
...
to pidfile_write happen, the pidfile will have nul characters prepended
due to the cached file descriptor offset...
Reviewed by: scottl
MFC after: 3 days
2006-04-11 23:10:02 +00:00