]> git.cameronkatri.com Git - pw-darwin.git/log
pw-darwin.git
9 years agoRemove dead declaration
Baptiste Daroussin [Fri, 29 May 2015 10:07:20 +0000 (10:07 +0000)]
Remove dead declaration

PR: 195928
MFC after: 2 days

9 years agoExport a list of VM objects in the system via a sysctl. The list can be
John Baldwin [Wed, 27 May 2015 18:11:05 +0000 (18:11 +0000)]
Export a list of VM objects in the system via a sysctl.  The list can be
examined via 'vmstat -o'.  It can be used to determine which files are
using physical pages of memory and how much each is using.

Differential Revision: https://reviews.freebsd.org/D2277
Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc. (forward porting to HEAD/10)

9 years agoRemove extendline definition
Baptiste Daroussin [Sun, 10 May 2015 11:24:16 +0000 (11:24 +0000)]
Remove extendline definition
Remove now unused PWBUFSZ define

9 years agoUse calloc(3) instead of malloc(3) + memset(3)
Baptiste Daroussin [Sun, 10 May 2015 11:18:01 +0000 (11:18 +0000)]
Use calloc(3) instead of malloc(3) + memset(3)
While here check the return of calloc(3)

9 years agoThe initial logic for allocating the new string was wrong, the conversion
Baptiste Daroussin [Sun, 10 May 2015 10:15:36 +0000 (10:15 +0000)]
The initial logic for allocating the new string was wrong, the conversion
to strndup(3) duplicated the same mistake, actually strdup(3) is good enough
to allocate the new string.

9 years agoUse strndup(3) instead of malloc(3) + memcpy(3)
Baptiste Daroussin [Sun, 10 May 2015 10:02:09 +0000 (10:02 +0000)]
Use strndup(3) instead of malloc(3) + memcpy(3)
Check the return of strndup

9 years agoRemove useless call to extendarray
Baptiste Daroussin [Sun, 10 May 2015 09:33:15 +0000 (09:33 +0000)]
Remove useless call to extendarray

9 years agoThe pwdb function is only used once to check the database rename it
Baptiste Daroussin [Sun, 10 May 2015 09:23:03 +0000 (09:23 +0000)]
The pwdb function is only used once to check the database rename it
pwdb_check and simplify it accordingly

9 years agoif the check of the pw db fails return the failed value
Baptiste Daroussin [Sun, 10 May 2015 09:11:12 +0000 (09:11 +0000)]
if the check of the pw db fails return the failed value

9 years agoSome style(9) fixes
Baptiste Daroussin [Sun, 10 May 2015 09:02:15 +0000 (09:02 +0000)]
Some style(9) fixes

9 years agoReplace sprintf(3) with snprintf(3)
Baptiste Daroussin [Sat, 9 May 2015 22:48:48 +0000 (22:48 +0000)]
Replace sprintf(3) with snprintf(3)

9 years agoUse snprintf(3) instead of sprintf(3)
Baptiste Daroussin [Sat, 9 May 2015 22:43:44 +0000 (22:43 +0000)]
Use snprintf(3) instead of sprintf(3)
Remove useless "else"

9 years agoRemove now unused LNBUFSZ buffer size
Baptiste Daroussin [Sat, 9 May 2015 22:08:30 +0000 (22:08 +0000)]
Remove now unused LNBUFSZ buffer size

9 years agoReturn from the function as early as possible
Baptiste Daroussin [Sat, 9 May 2015 21:53:33 +0000 (21:53 +0000)]
Return from the function as early as possible

This reduces the depth of the if statements and improves clarity of the code

9 years agoRemove some uneeded headers
Baptiste Daroussin [Sat, 9 May 2015 19:29:55 +0000 (19:29 +0000)]
Remove some uneeded headers

9 years agoRemove unneeded headers
Baptiste Daroussin [Sat, 9 May 2015 19:22:33 +0000 (19:22 +0000)]
Remove unneeded headers

9 years agoReplace malloc(3) + strcpy(3) + strcat(3) by asprintf(3)
Baptiste Daroussin [Sat, 9 May 2015 19:12:16 +0000 (19:12 +0000)]
Replace malloc(3) + strcpy(3) + strcat(3) by asprintf(3)

9 years agoUse snprintf(3) instead of strcpy(3) + strncat(3)
Baptiste Daroussin [Sat, 9 May 2015 19:09:34 +0000 (19:09 +0000)]
Use snprintf(3) instead of strcpy(3) + strncat(3)

9 years agoUse sbuf(9) instead of homebrewed buffered string
Baptiste Daroussin [Sat, 9 May 2015 19:00:16 +0000 (19:00 +0000)]
Use sbuf(9) instead of homebrewed buffered string

9 years agoPartially revert 278642
Baptiste Daroussin [Fri, 13 Feb 2015 07:51:26 +0000 (07:51 +0000)]
Partially revert 278642

On reinstall (overwrite) install(1) does not handle chflags

Reported by: ian

9 years agoUse PRECIOUSPROG instead of custom code to handle schg
Baptiste Daroussin [Thu, 12 Feb 2015 23:08:27 +0000 (23:08 +0000)]
Use PRECIOUSPROG instead of custom code to handle schg

This allows to preserve schg when installed with -DNO_ROOT

MFC after: 1 week

9 years agoClean up more usb related files when MK_USB == no when dealing with
Enji Cooper [Wed, 4 Feb 2015 11:43:19 +0000 (11:43 +0000)]
Clean up more usb related files when MK_USB == no when dealing with
manpages, libraries, and binaries

MFC after: 1 week
X-MFC with: r278135
Sponsored by: EMC / Isilon Storage Division

9 years agoRevert r277652
Baptiste Daroussin [Mon, 26 Jan 2015 16:50:42 +0000 (16:50 +0000)]
Revert r277652

uid and gid are never and should never be negative. The pw(8) manpage clearly
states the -u and -g arguments are for uids/gids, hence using negative values is
abusing a bug in former versions of pw(8)

9 years agogr_equal(): Fix a crash that could occur if the first group's member list
Mark Johnston [Sun, 25 Jan 2015 00:47:06 +0000 (00:47 +0000)]
gr_equal(): Fix a crash that could occur if the first group's member list
was longer than the second's. There is no need to compute and compare the
member list lengths in a separate pass, since we now just return false when
comparing member names if the list lengths are not equal.

MFC after: 2 weeks

9 years agoAllow negative numbers in -u and -g options
Baptiste Daroussin [Sat, 24 Jan 2015 19:13:03 +0000 (19:13 +0000)]
Allow negative numbers in -u and -g options

PR: 196514
MFC after: 1 week

10 years agoConvert to usr.bin/ to LIBADD
Baptiste Daroussin [Tue, 25 Nov 2014 14:29:10 +0000 (14:29 +0000)]
Convert to usr.bin/ to LIBADD
Reduce overlinking

10 years agoConvert to LIBADD.
Brad Davis [Mon, 24 Nov 2014 21:49:01 +0000 (21:49 +0000)]
Convert to LIBADD.

Reviewed by: bapt

10 years agoFix wrong message when using pw -V with a non existent directory
Baptiste Daroussin [Wed, 12 Nov 2014 22:27:53 +0000 (22:27 +0000)]
Fix wrong message when using pw -V with a non existent directory
Add a regression test about it

PR: 194971
Submitted by: Freddy DISSAUX <bugzilla@dsx.bsdsx.fr>

10 years agoFix renaming a group via the gr_copy function
Baptiste Daroussin [Tue, 28 Oct 2014 16:27:29 +0000 (16:27 +0000)]
Fix renaming a group via the gr_copy function

Add a regression test to pw(8) because the bug was discovered via using:
pw groupmod

PR: 187189
Reported by: mcdouga9@egr.msu.edu
Tested by: mcdouga9@egr.msu.edu
Patch by: Marc de la Gueronniere

10 years agoEnsure pw userdel -u <invalid> do not try to remove root
Baptiste Daroussin [Tue, 28 Oct 2014 15:46:22 +0000 (15:46 +0000)]
Ensure pw userdel -u <invalid> do not try to remove root

Check the uid passed is actually a number as early as possible

MFC after: 1 week

10 years agoDo not delete the group wheel when bad argument is passed to pw groupdel -g
Baptiste Daroussin [Tue, 28 Oct 2014 14:54:04 +0000 (14:54 +0000)]
Do not delete the group wheel when bad argument is passed to pw groupdel -g

Check that the -g argument is actually a number, if not report an error.
This argument is converted without checking with atoi(3) later so without this
check it converts any alpha entries into 0 meaning it deletes the group wheel

Add a regression test about it

PR: 90114
Reported by: bkoenig@cs.tu-berlin.de
MFC after: 1 week

10 years agoFix a regression in pw usermod -G list
Baptiste Daroussin [Tue, 28 Oct 2014 14:19:17 +0000 (14:19 +0000)]
Fix a regression in pw usermod -G list

The user was perperly adding the to different groups from "list" but was not
removed from the other groups it could have belong to.
While here add a regression test about this bug

PR: 185666
Reported by: sub.mesa@gmail.com
MFC after: 1 week

10 years agoWhen a group is renamed then the group has been invalidated for sure.
Baptiste Daroussin [Tue, 28 Oct 2014 11:20:30 +0000 (11:20 +0000)]
When a group is renamed then the group has been invalidated for sure.
In that case get the group information using the new name.

Add a regression test about this bug

PR: 193704
Reported by: az

10 years agoTwo more places where login_setcryptfmt() defaults to MD5 were missed
Dag-Erling Smørgrav [Thu, 9 Oct 2014 17:39:11 +0000 (17:39 +0000)]
Two more places where login_setcryptfmt() defaults to MD5 were missed
in r252688.

MFC after: 3 days

10 years ago- Add a test for bug 191427 where pw(8) will go into an infinite loop
Brad Davis [Thu, 2 Oct 2014 19:53:37 +0000 (19:53 +0000)]
- Add a test for bug 191427 where pw(8) will go into an infinite loop

Reviewed by: will
MFC after: 1 month

10 years agoConvert devd's client socket to type SOCK_SEQPACKET.
Alan Somers [Thu, 14 Aug 2014 22:33:56 +0000 (22:33 +0000)]
Convert devd's client socket to type SOCK_SEQPACKET.

This change consists of two merges from projects/zfsd/head along with the
addition of an ATF test case for the new functionality.

sbin/devd/tests/Makefile
sbin/devd/tests/client_test.c
Add ATF test cases for reading events from both devd socket types.

r266519:
sbin/devd/devd.8
sbin/devd/devd.cc
Create a new socket, of type SOCK_SEQPACKET, for communicating with
clients. SOCK_SEQPACKET sockets preserve record boundaries,
simplying code in the client. The old SOCK_STREAM socket is retained
for backwards-compatibility with existing clients.

r269993:
sbin/devd/devd.8
Fix grammar bug.

CR: https://reviews.freebsd.org/rS266519
MFC after: 5 days
Sponsored by: Spectra Logic

10 years agoMinor style tweaks.
Pedro F. Giffuni [Wed, 13 Aug 2014 03:44:30 +0000 (03:44 +0000)]
Minor style tweaks.

Obtained from: OpenBSD (CVS rev. 1.7)
MFC after: 3 days

10 years agopw: fix up deletion of users from groups
Mateusz Guzik [Fri, 27 Jun 2014 18:51:19 +0000 (18:51 +0000)]
pw: fix up deletion of users from groups

Previuosly given 'foo,bar' members, removing 'foo' would result in an
infinite loop.

PR: 191427
Submitted by: Voradesh Yenbut <yenbut cs.washington.edu>
MFC after: 1 week

10 years agoFix changing the username
Baptiste Daroussin [Fri, 20 Jun 2014 10:38:08 +0000 (10:38 +0000)]
Fix changing the username

PR: 189172
Submitted by: fullermd@over-yonder.net
MFC after: 1 week

10 years agoRemoved compatibility with pre FreeBSD 2.2 pw_mkdb command
Baptiste Daroussin [Fri, 20 Jun 2014 10:34:32 +0000 (10:34 +0000)]
Removed compatibility with pre FreeBSD 2.2 pw_mkdb command
Fix some broken indentattion

PR: 189173
Submitted by: fullermd@over-yonder.net
MFC after: 1 week

10 years agouse .Mt to mark up email addresses consistently (part2)
Baptiste Daroussin [Fri, 20 Jun 2014 09:57:27 +0000 (09:57 +0000)]
use .Mt to mark up email addresses consistently (part2)

PR: 191174
Submitted by: Franco Fichtner  <franco@lastsummer.de>

10 years agoIFC @266473
Alan Somers [Wed, 21 May 2014 20:30:52 +0000 (20:30 +0000)]
IFC @266473

10 years agoUse src.opts.mk in preference to bsd.own.mk except where we need stuff
Warner Losh [Tue, 6 May 2014 04:22:01 +0000 (04:22 +0000)]
Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.

10 years agoIFC @264767
Alan Somers [Wed, 23 Apr 2014 21:52:43 +0000 (21:52 +0000)]
IFC @264767

10 years agoSimplify reading pw.conf(5) by using getline(3)
Baptiste Daroussin [Tue, 22 Apr 2014 21:07:56 +0000 (21:07 +0000)]
Simplify reading pw.conf(5) by using getline(3)

10 years agoFix pw(8) deletion of group "username" on userdel even if group "username"
Devin Teske [Thu, 13 Mar 2014 18:16:42 +0000 (18:16 +0000)]
Fix pw(8) deletion of group "username" on userdel even if group "username"
is not associated with user "username". E.g., user "foo" has primary group
"wheel" and is unassociated with group "foo", yet userdel would delete the
group "foo" when deleting user "foo" (despite the fact that user "foo" is
not associated with group "foo" in any way).

Patch committed with minor style(9) changes.

PR: bin/169471
Submitted by: Alexander Pyhalov <apyhalov@gmail.com>

10 years agoPart 2 of bug 187310.. had to commit separately due to local confusion.
Julian Elischer [Thu, 6 Mar 2014 19:58:03 +0000 (19:58 +0000)]
Part 2 of bug 187310.. had to commit separately due to local confusion.
Don't let pw crash when give certain input.

PR: 187310
Submitted by: Kim Shrier
MFC after: 1 week

10 years agoStop pw(8) from segfaulting when given certain input
Julian Elischer [Thu, 6 Mar 2014 19:26:08 +0000 (19:26 +0000)]
Stop pw(8) from segfaulting when given certain input

PR:187310
Submitted by: Kim Shrier
Obtained from: bug
MFC after: 1 week

10 years agomdoc: minor paragraph fixes.
Joel Dahl [Sat, 8 Feb 2014 13:37:02 +0000 (13:37 +0000)]
mdoc: minor paragraph fixes.

11 years agoIFC @256277
Alan Somers [Thu, 10 Oct 2013 21:46:43 +0000 (21:46 +0000)]
IFC @256277

Approved by: ken (mentor)

11 years agolibutil: Use O_CLOEXEC for internal file descriptors from open().
Jilles Tjoelker [Wed, 28 Aug 2013 21:10:37 +0000 (21:10 +0000)]
libutil: Use O_CLOEXEC for internal file descriptors from open().

11 years agoIFC @253398
Xin LI [Wed, 17 Jul 2013 01:32:29 +0000 (01:32 +0000)]
IFC @253398

11 years agoFall back to sha512 if passwd_format is not set.
Dag-Erling Smørgrav [Thu, 4 Jul 2013 07:59:11 +0000 (07:59 +0000)]
Fall back to sha512 if passwd_format is not set.

MFC after: 3 days

11 years agoThere is no reason to disallow setting the password or account expiry
Dag-Erling Smørgrav [Wed, 3 Jul 2013 09:48:24 +0000 (09:48 +0000)]
There is no reason to disallow setting the password or account expiry
date to the current date.

MFC after: 3 days

11 years agoFix -Wunsequenced warning
Tim Kientzle [Sat, 29 Jun 2013 15:54:17 +0000 (15:54 +0000)]
Fix -Wunsequenced warning

Submitted by:   dt71@gmx.com

11 years agomdoc sweep
Joel Dahl [Mon, 13 May 2013 18:13:50 +0000 (18:13 +0000)]
mdoc sweep

11 years agocommit correct tested fix for gr_util.c
Diane Bruce [Sat, 9 Mar 2013 13:30:06 +0000 (13:30 +0000)]
commit correct tested fix for gr_util.c

Approved by: theraven

11 years agoCleanup gr_add() so it does not leak mem
Diane Bruce [Thu, 7 Mar 2013 19:00:00 +0000 (19:00 +0000)]
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

11 years agoIFC @247348.
Xin LI [Tue, 26 Feb 2013 21:16:10 +0000 (21:16 +0000)]
IFC @247348.

11 years agoPrevent a null pointer dereference in pw userdel when deleting
Daniel Eischen [Fri, 1 Feb 2013 05:19:49 +0000 (05:19 +0000)]
Prevent a null pointer dereference in pw userdel when deleting
a user whose group != username.

12 years agoIFC @ r245509
Neel Natu [Thu, 17 Jan 2013 07:04:37 +0000 (07:04 +0000)]
IFC @ r245509

12 years agoRemove unused variables
Eitan Adler [Wed, 16 Jan 2013 05:03:49 +0000 (05:03 +0000)]
Remove unused variables

Approved by: cperciva
MFC After: 3 days

12 years agolibutil: fix typo in comment for gr_fini.
Mateusz Guzik [Sun, 13 Jan 2013 22:08:18 +0000 (22:08 +0000)]
libutil: fix typo in comment for gr_fini.

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

12 years agolibutil: utilize strsep instead of strcat in a loop in gr_make
Mateusz Guzik [Sun, 13 Jan 2013 21:28:47 +0000 (21:28 +0000)]
libutil: utilize strsep instead of strcat in a loop in gr_make

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

12 years agolibutil: move group_line_format into the scop of its only user.
Mateusz Guzik [Sun, 13 Jan 2013 21:26:57 +0000 (21:26 +0000)]
libutil: move group_line_format into the scop of its only user.

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

12 years agolibutil: eliminate 'found' variable in gr_equal
Mateusz Guzik [Sun, 13 Jan 2013 21:25:43 +0000 (21:25 +0000)]
libutil: eliminate 'found' variable in gr_equal

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

12 years agoIFC @ r245178
Neel Natu [Wed, 9 Jan 2013 02:26:50 +0000 (02:26 +0000)]
IFC @ r245178

12 years agopw: free group returned by gr_add
Mateusz Guzik [Sun, 6 Jan 2013 21:56:58 +0000 (21:56 +0000)]
pw: free group returned by gr_add

12 years agoIFC @ r244983.
Neel Natu [Fri, 4 Jan 2013 19:28:32 +0000 (19:28 +0000)]
IFC @ r244983.

12 years agoSimplify pointing dst after the end of all the gr_mem pointers in newgr
Baptiste Daroussin [Fri, 28 Dec 2012 20:44:10 +0000 (20:44 +0000)]
Simplify pointing dst after the end of all the gr_mem pointers in newgr

Submitted by: pjd
Reviewed by: db

12 years agoerrno = ENOMEM was supposed to be removed not return (NULL);
Baptiste Daroussin [Fri, 28 Dec 2012 20:30:04 +0000 (20:30 +0000)]
errno = ENOMEM was supposed to be removed not return (NULL);

Submitted by: gcooper

12 years agomalloc() sets errno to ENOMEM already.
Baptiste Daroussin [Fri, 28 Dec 2012 20:21:14 +0000 (20:21 +0000)]
malloc() sets errno to ENOMEM already.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

12 years agoDo not leave parts of the new group uninitialized in gr_dup().
Baptiste Daroussin [Fri, 28 Dec 2012 20:19:54 +0000 (20:19 +0000)]
Do not leave parts of the new group uninitialized in gr_dup().

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Reported by: pjd

12 years agoavoid arithmetic on uintptr_t
Baptiste Daroussin [Thu, 27 Dec 2012 20:47:34 +0000 (20:47 +0000)]
avoid arithmetic on uintptr_t

Submitted by: pjd
Reviewed by: jilles

12 years agocast to uintptr_t to properly calculate offset
Baptiste Daroussin [Thu, 27 Dec 2012 20:31:12 +0000 (20:31 +0000)]
cast to uintptr_t to properly calculate offset

Reported by: mdf
Submitted by: db

12 years agoAdd O_CLOEXEC to flopen
Baptiste Daroussin [Thu, 27 Dec 2012 20:24:44 +0000 (20:24 +0000)]
Add O_CLOEXEC to flopen

Requested by: jilles

12 years agoSimplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil.
Baptiste Daroussin [Thu, 27 Dec 2012 19:43:29 +0000 (19:43 +0000)]
Simplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil.

12 years agogr_dup: simplify duplication of group
Baptiste Daroussin [Thu, 27 Dec 2012 19:33:43 +0000 (19:33 +0000)]
gr_dup: simplify duplication of group

Submitted by: db

12 years ago- Clean up previous gr_add use malloc instead of calloc
Baptiste Daroussin [Thu, 27 Dec 2012 16:51:29 +0000 (16:51 +0000)]
- Clean up previous gr_add use malloc instead of calloc
- Fix tinderbox error

Submitted by: db

12 years agoFix a regression in "pw group show" introduced r242349:
Baptiste Daroussin [Thu, 27 Dec 2012 14:44:13 +0000 (14:44 +0000)]
Fix a regression in "pw group show" introduced r242349:
print a newline after printing each group line.

PR: bin/174731
Submitted by: Jan Beich <jbeich@tormail.org>

12 years agoSimplify the code by using the new gr_add function
Baptiste Daroussin [Thu, 27 Dec 2012 14:35:06 +0000 (14:35 +0000)]
Simplify the code by using the new gr_add function

12 years agoNew gr_add function to provide a clean and safe method to append a new member
Baptiste Daroussin [Thu, 27 Dec 2012 14:30:19 +0000 (14:30 +0000)]
New gr_add function to provide a clean and safe method to append a new member
into an existing group.

Submitted by: db

12 years agoUse flopen(3) instead of open(2) + flock(2)
Baptiste Daroussin [Thu, 27 Dec 2012 14:09:50 +0000 (14:09 +0000)]
Use flopen(3) instead of open(2) + flock(2)

12 years agoSimplify copying of group members by using memcpy
Baptiste Daroussin [Wed, 26 Dec 2012 23:16:24 +0000 (23:16 +0000)]
Simplify copying of group members by using memcpy

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

12 years agoFix off-by-one error in memory allocation: j entries, one new and a null
Baptiste Daroussin [Wed, 26 Dec 2012 23:14:33 +0000 (23:14 +0000)]
Fix off-by-one error in memory allocation: j entries, one new and a null
terminator is j + 2.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

12 years agoIn case of the deletion of a user those whole database has to be regenerated,
Baptiste Daroussin [Wed, 26 Dec 2012 18:28:17 +0000 (18:28 +0000)]
In case of the deletion of a user those whole database has to be regenerated,
otherwise the user planned to be deleted remain in the pwd.db while removed from
the plain text password file.

12 years agoFix creating a user and adding it to a group
Baptiste Daroussin [Wed, 26 Dec 2012 18:14:45 +0000 (18:14 +0000)]
Fix creating a user and adding it to a group

Reported by: "Sam Fourman Jr." <sfourman@gmail.com>, dim

12 years agoSimplify string duplication: use strdup instead of malloc + strcpy
Eitan Adler [Wed, 5 Dec 2012 13:56:56 +0000 (13:56 +0000)]
Simplify string duplication: use strdup instead of malloc + strcpy

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

12 years agoAvoid overflowing the file buffer
Eitan Adler [Wed, 5 Dec 2012 13:56:52 +0000 (13:56 +0000)]
Avoid overflowing the file buffer

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

12 years agoUse strdup instead of malloc + strcpy
Eitan Adler [Wed, 5 Dec 2012 13:56:49 +0000 (13:56 +0000)]
Use strdup instead of malloc + strcpy

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

12 years agoAvoid overflow of file buffer
Eitan Adler [Wed, 5 Dec 2012 13:56:46 +0000 (13:56 +0000)]
Avoid overflow of file buffer

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

12 years agoRemove useless check for NULL prior to free.
Eitan Adler [Wed, 5 Dec 2012 13:56:43 +0000 (13:56 +0000)]
Remove useless check for NULL prior to free.

Approved by: cperciva
MFC after: 2 weeks

12 years agoIFC @r243836
Neel Natu [Tue, 4 Dec 2012 04:37:42 +0000 (04:37 +0000)]
IFC @r243836

12 years agoMFC
Alexander Motin [Tue, 27 Nov 2012 20:22:36 +0000 (20:22 +0000)]
MFC

12 years agoMFC @ r241285
Alexander Motin [Tue, 27 Nov 2012 18:38:50 +0000 (18:38 +0000)]
MFC @ r241285

12 years agoIn NIS mode first chmod(2) the temporary file and is succeed then rename(2)
Baptiste Daroussin [Tue, 20 Nov 2012 14:05:46 +0000 (14:05 +0000)]
In NIS mode first chmod(2) the temporary file  and is succeed then rename(2)

12 years agoonly rename(2) after chmod(2) has succeed
Baptiste Daroussin [Tue, 20 Nov 2012 14:03:09 +0000 (14:03 +0000)]
only rename(2) after chmod(2) has succeed
report error if chmod(2) fails

Reported by: jh

12 years agoCorrectly set the password file mode after renaming in NIS mode
Baptiste Daroussin [Tue, 20 Nov 2012 10:59:41 +0000 (10:59 +0000)]
Correctly set the password file mode after renaming in NIS mode

12 years agochange mode the group file to 0644 after a successfull rename(2)
Baptiste Daroussin [Tue, 20 Nov 2012 07:22:07 +0000 (07:22 +0000)]
change mode the group file to 0644 after a successfull rename(2)

12 years agoIFC @ r243164
Neel Natu [Sat, 17 Nov 2012 02:55:47 +0000 (02:55 +0000)]
IFC @ r243164