Sergey Kandaurov
869f276295
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
Tim Kientzle
64330eb00f
Fix -Wunsequenced warning
...
Submitted by: dt71@gmx.com
2013-06-29 15:52:48 +00:00
Simon J. Gerraty
69e6d7b75e
sync from head
2013-04-12 20:48:55 +00:00
Pawel Jakub Dawidek
36a00a3f38
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
Simon J. Gerraty
7cf3a1c6b2
Updated dependencies
2013-03-11 17:21:52 +00:00
Diane Bruce
5e87983769
commit correct tested fix for gr_util.c
...
Approved by: theraven
2013-03-09 13:30:06 +00:00
Diane Bruce
86e2f99d40
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
Ruslan Ermilov
d1a0cea48b
Fixed documented prototype of kinfo_getproc(3).
2013-03-01 07:39:14 +00:00
Simon J. Gerraty
f5f7c05209
Updated dependencies
2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b
Sync with HEAD.
2013-02-08 16:10:16 +00:00
Mateusz Guzik
08ecf0cc41
libutil: fix typo in comment for gr_fini.
...
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
2013-01-13 22:08:18 +00:00
Mateusz Guzik
49013fb476
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
Mateusz Guzik
fe75b0f0e5
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
Mateusz Guzik
29365f023a
libutil: eliminate 'found' variable in gr_equal
...
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
2013-01-13 21:25:43 +00:00
Baptiste Daroussin
7780953ee4
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
Baptiste Daroussin
fe390747e4
errno = ENOMEM was supposed to be removed not return (NULL);
...
Submitted by: gcooper
2012-12-28 20:30:04 +00:00
Baptiste Daroussin
d00489b70f
malloc() sets errno to ENOMEM already.
...
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
2012-12-28 20:21:14 +00:00
Baptiste Daroussin
167145a17d
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
Baptiste Daroussin
5019747579
avoid arithmetic on uintptr_t
...
Submitted by: pjd
Reviewed by: jilles
2012-12-27 20:47:34 +00:00
Baptiste Daroussin
7d90019877
cast to uintptr_t to properly calculate offset
...
Reported by: mdf
Submitted by: db
2012-12-27 20:31:12 +00:00
Baptiste Daroussin
ede89d5db2
Add O_CLOEXEC to flopen
...
Requested by: jilles
2012-12-27 20:24:44 +00:00
Baptiste Daroussin
1067c64a19
gr_dup: simplify duplication of group
...
Submitted by: db
2012-12-27 19:33:43 +00:00
Baptiste Daroussin
2bfeb4fe75
- Clean up previous gr_add use malloc instead of calloc
...
- Fix tinderbox error
Submitted by: db
2012-12-27 16:51:29 +00:00
Baptiste Daroussin
be49c83011
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
Baptiste Daroussin
98e79fb122
Use flopen(3) instead of open(2) + flock(2)
2012-12-27 14:09:50 +00:00
Baptiste Daroussin
09259e6c48
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
Baptiste Daroussin
2d2b6ad74d
change mode the group file to 0644 after a successfull rename(2)
2012-11-20 07:22:07 +00:00
Simon J. Gerraty
7cd2dcf076
Updated/new Makefile.depend
2012-11-08 21:24:17 +00:00
Simon J. Gerraty
23090366f7
Sync from head
2012-11-04 02:52:03 +00:00
Baptiste Daroussin
46f8c63df6
Fix typo
2012-11-03 00:30:22 +00:00
Dag-Erling Smørgrav
192bc3edf4
Correct attribution.
2012-10-31 15:04:27 +00:00
Joel Dahl
2acb4741ca
Minor mdoc and language fixes.
2012-10-30 22:30:30 +00:00
Baptiste Daroussin
f5a05b2ba4
Removed unnecessary bits in the header that shows where I stole the template
2012-10-30 22:26:19 +00:00
Baptiste Daroussin
42818163b4
Document the pw_util(3) functions
...
Reviewed by: des, gjb
2012-10-30 22:18:08 +00:00
Baptiste Daroussin
b3d9795c98
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
Baptiste Daroussin
29e575503c
make pw_init and gr_init fail if the specified master password or group file is
...
a directory.
MFC after: 1 month
2012-10-29 17:19:43 +00:00
Baptiste Daroussin
de0bfe73b9
Fix IEC / SI binary prefixes (Ki, Mi, Gi, etc) production by humanize_number(3)
...
PR: bin/171487
Submitted by: matthew
MFC after: 1 week
2012-09-12 11:41:03 +00:00
Marcel Moolenaar
7750ad47a9
Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
...
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Dag-Erling Smørgrav
b4f560356a
Switch the default password hash from md5 to sha512.
...
MFC after: 1 week
2012-06-19 14:46:18 +00:00
Baptiste Daroussin
2f1b1e91a3
Revert user comparison back to user names as some user can share uids (root/toor
...
for example)
get the username information from old_pw structures to still allow renaming of a
user.
Reported by: Claude Buisson <clbuisson@orange.fr>
Approved by: des (mentor)
MFC after: 3 weeks
2012-06-19 11:39:56 +00:00
Dag-Erling Smørgrav
7c5a921699
Finally nuke auth.conf, nine years after it was deprecated. The only
...
thing it was still used for was to set the "global default" password
hash. Since the stock auth.conf contained nothing but comments, the
global default was actually the first algorithm in crypt(3)'s list,
which happens to be DES; I take the fact that nobody noticed as proof
that it was not used outside of crypt(3).
The only other use in our tree was in the Kerberos support code in
in tinyware's passwd(1). I removed that code in an earlier commit;
it would not have compiled anyway, as it only supported Kerberos IV.
The auth_getval() function is now a stub that always returns NULL,
which has the same effect as a functional auth_getval() with an
empty auth.conf.
MFC after: 3 weeks
2012-06-12 17:02:53 +00:00
Dag-Erling Smørgrav
fb374358bf
Document that we also support sha256 and sha512.
...
MFC after: 1 week
2012-06-08 12:36:08 +00:00
Glen Barber
7b1d17a1bc
General mdoc(7) and typo fixes.
...
PR: 167804
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
2012-05-12 15:08:22 +00:00
Joel Dahl
66265da747
mdoc: terminate quoted strings.
2012-03-30 12:34:34 +00:00
Joel Dahl
288eac5aed
mandoc complains loudly when <TAB>s are misused in columnated lists. Fix
...
this syntax violation and while I'm here also convert <TAB> to Ta and adjust
quotation marks in order to prevent this problem in the future.
2012-03-29 16:02:40 +00:00
Eitan Adler
50d675f7a9
Remove trailing whitespace per mdoc lint warning
...
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
2012-03-29 05:02:12 +00:00
Joel Dahl
bea977e7f6
mdoc: sort prologue macros.
2012-03-26 19:23:57 +00:00
Joel Dahl
61a0bf2af8
This string should be quoted.
...
Noticed by: brueffer
2012-03-26 15:29:02 +00:00
Joel Dahl
c2965cd185
mdoc: terminate quoted strings.
...
Reviewed by: brueffer
2012-03-26 15:18:14 +00:00
Glen Barber
3102cfe2e2
Fix various typos in manual pages.
...
Submitted by: amdmi3
PR: 165431
MFC after: 1 week
2012-02-25 14:31:25 +00:00