sjg
ed3fc70bf5
Merge from head
2014-05-08 23:54:15 +00:00
imp
2118f42afd
Use src.opts.mk in preference to bsd.own.mk except where we need stuff
...
from the latter.
2014-05-06 04:22:01 +00:00
markj
2965ace268
Fix a typo.
...
MFC after: 3 days
2014-05-03 16:18:42 +00:00
sjg
0c7e03a54c
Merge head
2014-04-27 08:13:43 +00:00
eadler
8df0b070e8
libutil/pw_util.3: Fix two prototypes.
...
Reported by: marino
Obtained from: DragonFlyBSD (e82b5d3dfa969bfcda5ffadceccc682b6bdcd077)
MFC After: 3 days
2014-02-13 05:13:22 +00:00
eadler
11786add30
Indicate that expand_number is case-insensitive.
...
Reviewed by: -scsi
2013-11-12 00:56:22 +00:00
eadler
03a9e9340c
Mention in login.conf.5 which fields may be infinite and how to specifify infinity.
...
The number of ways to indicate this confuses people.
PR: docs/100196
Reported by: "Dr. Markus Waldeck" <waldeck@gmx.de>
Reported by: Jamie Landeg Jones <jamie.landeg.jones@gmail.com>
2013-10-27 04:59:18 +00:00
eadler
29be42f32b
All man pages refer to FreeBSD so there is no need to mention "In .Fx"
2013-10-27 04:49:40 +00:00
kib
734382a525
Add a resource limit for the total number of kqueues available to the
...
user. Kqueue now saves the ucred of the allocating thread, to
correctly decrement the counter on close.
Under some specific and not real-world use scenario for kqueue, it is
possible for the kqueues to consume memory proportional to the square
of the number of the filedescriptors available to the process. Limit
allows administrator to prevent the abuse.
This is kernel-mode side of the change, with the user-mode enabling
commit following.
Reported and tested by: pho
Discussed with: jmg
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
2013-10-21 16:46:12 +00:00
sjg
7fcd33c1fa
Merge head@256284
2013-10-13 02:35:19 +00:00
jmg
ec9fa283ad
don't assert on bad args, instead return an error..
...
Since so many programs don't check return value, always NUL terminate
the buf...
fix rounding when using base 1024 (the bug that started it all)...
add a set of test cases so we can make sure that things don't break
in the future...
Thanks to Clifton Royston for testing and the test program...
Approved by: re (hrs, glebius)
MFC after: 1 week
2013-10-07 22:22:57 +00:00
sjg
62bb106222
Merge from head
2013-09-05 20:18:59 +00:00
pluknet
0030cdac07
The round of expand_number() cleanups.
...
o Fix range error checking to detect overflow when uint64_t < uintmax_t.
o Remove a non-functional check for no valid digits as pointed out by Bruce.
o Remove a rather pointless comment describing what the function does.
o Clean up a bunch of style bugs.
Brucified by: bde
2013-08-30 11:21:52 +00:00
jilles
baaacfdc28
libutil: Use O_CLOEXEC for internal file descriptors from open().
2013-08-28 21:10:37 +00:00
pluknet
96dfe577d2
Reset errno before strtoumax() call to properly detect ERANGE.
...
Restore saved errno if strtoumax() call is successful.
Reported by: ache
Reviewed by: jilles
MFC after: 1 week
2013-08-21 22:37:15 +00:00
pluknet
fd7d22e698
Check strtoumax(3) for ERANGE in case of non-prefixed string.
...
OK'd by: silence on current@
MFC after: 1 week
2013-08-21 16:46:06 +00:00
kientzle
7598dd9981
Fix -Wunsequenced warning
...
Submitted by: dt71@gmx.com
2013-06-29 15:52:48 +00:00
sjg
97d8b94956
sync from head
2013-04-12 20:48:55 +00:00
pjd
1b62958b4e
When pidptr was passed as NULL to pidfile_open(3), we were returning
...
EAGAIN/EWOULDBLOCK when another daemon was running and had the pidfile open.
We should return EEXIST in that case, fix it.
Reported by: Dirk Engling <erdgeist@erdgeist.org>
Reviewed by: jhb, Dirk Engling <erdgeist@erdgeist.org>
MFC after: 1 week
2013-03-14 20:22:52 +00:00
sjg
6d37b86f2b
Updated dependencies
2013-03-11 17:21:52 +00:00
db
97292df51d
commit correct tested fix for gr_util.c
...
Approved by: theraven
2013-03-09 13:30:06 +00:00
db
f96d697f81
Cleanup gr_add() so it does not leak mem
...
This is part of ongoing work on sbin/pw
M libutil.h
M gr_util.c
Approved by: theraven
2013-03-07 19:00:00 +00:00
ru
7399e0afc2
Fixed documented prototype of kinfo_getproc(3).
2013-03-01 07:39:14 +00:00
sjg
0ee5295509
Updated dependencies
2013-02-16 01:23:54 +00:00
obrien
3028e3f8ab
Sync with HEAD.
2013-02-08 16:10:16 +00:00
mjg
89fb0f2543
libutil: fix typo in comment for gr_fini.
...
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
2013-01-13 22:08:18 +00:00
mjg
fecf48554c
libutil: utilize strsep instead of strcat in a loop in gr_make
...
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
2013-01-13 21:28:47 +00:00
mjg
c942285112
libutil: move group_line_format into the scop of its only user.
...
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
2013-01-13 21:26:57 +00:00
mjg
15b9700547
libutil: eliminate 'found' variable in gr_equal
...
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
2013-01-13 21:25:43 +00:00
bapt
9db4d3200a
Simplify pointing dst after the end of all the gr_mem pointers in newgr
...
Submitted by: pjd
Reviewed by: db
2012-12-28 20:44:10 +00:00
bapt
3c6bd22efe
errno = ENOMEM was supposed to be removed not return (NULL);
...
Submitted by: gcooper
2012-12-28 20:30:04 +00:00
bapt
83035e8984
malloc() sets errno to ENOMEM already.
...
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
2012-12-28 20:21:14 +00:00
bapt
b69ff2af2f
Do not leave parts of the new group uninitialized in gr_dup().
...
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Reported by: pjd
2012-12-28 20:19:54 +00:00
bapt
9708a96be5
avoid arithmetic on uintptr_t
...
Submitted by: pjd
Reviewed by: jilles
2012-12-27 20:47:34 +00:00
bapt
85f7f7664e
cast to uintptr_t to properly calculate offset
...
Reported by: mdf
Submitted by: db
2012-12-27 20:31:12 +00:00
bapt
85a7bc8863
Add O_CLOEXEC to flopen
...
Requested by: jilles
2012-12-27 20:24:44 +00:00
bapt
2f0af9e7e5
gr_dup: simplify duplication of group
...
Submitted by: db
2012-12-27 19:33:43 +00:00
bapt
247c2a4086
- Clean up previous gr_add use malloc instead of calloc
...
- Fix tinderbox error
Submitted by: db
2012-12-27 16:51:29 +00:00
bapt
b63557c001
New gr_add function to provide a clean and safe method to append a new member
...
into an existing group.
Submitted by: db
2012-12-27 14:30:19 +00:00
bapt
925e83c0bd
Use flopen(3) instead of open(2) + flock(2)
2012-12-27 14:09:50 +00:00
bapt
2ed31d29a1
only rename(2) after chmod(2) has succeed
...
report error if chmod(2) fails
Reported by: jh
2012-11-20 14:03:09 +00:00
bapt
9acb3e40c2
change mode the group file to 0644 after a successfull rename(2)
2012-11-20 07:22:07 +00:00
sjg
9f7bd28e77
Updated/new Makefile.depend
2012-11-08 21:24:17 +00:00
sjg
778e93c51a
Sync from head
2012-11-04 02:52:03 +00:00
bapt
dd4851eebf
Fix typo
2012-11-03 00:30:22 +00:00
des
87941a0e19
Correct attribution.
2012-10-31 15:04:27 +00:00
joel
9ed42f5c06
Minor mdoc and language fixes.
2012-10-30 22:30:30 +00:00
bapt
1adb3efbd2
Removed unnecessary bits in the header that shows where I stole the template
2012-10-30 22:26:19 +00:00
bapt
4bbfc76333
Document the pw_util(3) functions
...
Reviewed by: des, gjb
2012-10-30 22:18:08 +00:00
bapt
dabdba1306
backout r242319, racy and not done in the right place
...
Reported by: Garrett Cooper <yanegomi@gmail.com>
2012-10-29 18:06:09 +00:00