]> git.cameronkatri.com Git - pw-darwin.git/log
pw-darwin.git
9 years agoRemove useless assignement of linelen
Baptiste Daroussin [Tue, 29 Dec 2015 00:02:08 +0000 (00:02 +0000)]
Remove useless assignement of linelen

9 years agoRestore dryrun support for pw groupmod
Baptiste Daroussin [Mon, 28 Dec 2015 23:57:22 +0000 (23:57 +0000)]
Restore dryrun support for pw groupmod

9 years agopw_checkname since the beginning if too strict on GECOS field,
Baptiste Daroussin [Wed, 2 Dec 2015 22:35:25 +0000 (22:35 +0000)]
pw_checkname since the beginning if too strict on GECOS field,
relax it a bit so gecos can be used to store multibytes data.

This was unseen before FreeBSD 10.2 as this validation function was motly unused
since FreeBSD 10.2 the usage of this function has been generalized to improve
validation.

Reported by: des
MFC after: 1 week

9 years agoFix handling of numeric-only names with pw lock
Baptiste Daroussin [Wed, 2 Dec 2015 22:01:37 +0000 (22:01 +0000)]
Fix handling of numeric-only names with pw lock
Add a regression test about it

PR: 204968
MFC after: 1 week

9 years agoIn pw_userlock, set 'name' to NULL when we encounter an all number string
Xin LI [Fri, 30 Oct 2015 00:46:52 +0000 (00:46 +0000)]
In pw_userlock, set 'name' to NULL when we encounter an all number string
because it is also used as an indicator of whether a name or an UID is
being used and we may have undefined results as 'name' may contain
uninitialized stack contents.

MFC after: 2 weeks

9 years agoFix unlikely memory leak.
Bryan Drewery [Thu, 29 Oct 2015 18:29:28 +0000 (18:29 +0000)]
Fix unlikely memory leak.

It is unlikely since the first check in the function is that dir[0] is '/',
but later code changes may make it real.

Coverity CID: 1332104

9 years agoInitialize `quiet` to false so `pw groupnext` again prints out the next gid
Enji Cooper [Mon, 19 Oct 2015 18:29:32 +0000 (18:29 +0000)]
Initialize `quiet` to false so `pw groupnext` again prints out the next gid
by default

Reported by: Florian Degner <f.degner@gmx.de>
MFC after: 1 week
PR: 203876
Sponsored by: EMC / Isilon Storage Division

9 years agoMerge from head
Baptiste Daroussin [Fri, 9 Oct 2015 22:45:54 +0000 (22:45 +0000)]
Merge from head

9 years agoFix a repeated typo: rootir -> rootdir.
Warren Block [Fri, 9 Oct 2015 14:55:55 +0000 (14:55 +0000)]
Fix a repeated typo: rootir -> rootdir.

Approved by: bapt
MFC after: 1 week

9 years agoMerge from head
Baptiste Daroussin [Thu, 1 Oct 2015 09:36:43 +0000 (09:36 +0000)]
Merge from head

9 years agoRegression: fix usershow -7
Baptiste Daroussin [Mon, 14 Sep 2015 19:23:00 +0000 (19:23 +0000)]
Regression: fix usershow -7

Submitted by: Dan McGregor (via IRC)
MFC after: 2 days

9 years agoFinish merging from head, messed up in previous attempt
Baptiste Daroussin [Sat, 12 Sep 2015 12:03:02 +0000 (12:03 +0000)]
Finish merging from head, messed up in previous attempt

9 years agoMerge from head
Baptiste Daroussin [Sat, 12 Sep 2015 11:41:31 +0000 (11:41 +0000)]
Merge from head

9 years agoRegression: fix pw usermod -d
Baptiste Daroussin [Sat, 12 Sep 2015 08:24:25 +0000 (08:24 +0000)]
Regression: fix pw usermod -d

Mark the user has having been edited if -d option is passed to usermod and
so the request change of home directory actually happen

PR: 203052
Reported by: lenzi.sergio@gmail.com
MFC after: 2 days

9 years agoFix err pointer not initialized to NULL resulting
Baptiste Daroussin [Fri, 21 Aug 2015 14:28:14 +0000 (14:28 +0000)]
Fix err pointer not initialized to NULL resulting

Reported by: "O. Hartmann" <ohartman@zedat.fu-berlin.de>

9 years agoFix /home symlink creation
Baptiste Daroussin [Fri, 21 Aug 2015 09:28:20 +0000 (09:28 +0000)]
Fix /home symlink creation

Add regression test about it

9 years agoFix useradd regression:
Baptiste Daroussin [Fri, 21 Aug 2015 07:09:53 +0000 (07:09 +0000)]
Fix useradd regression:

Readd the function to create the parents home directory if it does not exists.
if it is only a directory at the top level of the hierarchy symlink it into /usr
as it used to be done before.

Reported by: kevlo, adrian

9 years agoRegression: fix pw usermod -w xxx
Baptiste Daroussin [Fri, 14 Aug 2015 13:39:55 +0000 (13:39 +0000)]
Regression: fix pw usermod -w xxx

Reported by: gjb

9 years agoMFP r276712.
Alexander V. Chernikov [Tue, 11 Aug 2015 05:51:00 +0000 (05:51 +0000)]
MFP r276712.

* Split lltable_init() into lltable_allocate_htbl() (alloc
  hash table with default callbacks) and lltable_link() (
  links any lltable to the list).
* Switch from LLTBL_HASHTBL_SIZE to per-lltable hash size field.
* Move lltable setup to separate functions in in[6]_domifattach.

9 years agoMFP r274553:
Alexander V. Chernikov [Sat, 8 Aug 2015 17:48:54 +0000 (17:48 +0000)]
MFP r274553:
* Move lle creation/deletion from lla_lookup to separate functions:
  lla_lookup(LLE_CREATE) -> lla_create
  lla_lookup(LLE_DELETE) -> lla_delete
lla_create now returns with LLE_EXCLUSIVE lock for lle.
* Provide typedefs for new/existing lltable callbacks.

Reviewed by: ae

9 years agoAvoid calling strlen() where we can use the strspn() return value.
Ed Schouten [Mon, 3 Aug 2015 22:07:50 +0000 (22:07 +0000)]
Avoid calling strlen() where we can use the strspn() return value.

9 years agoClarify pw(8) manual w/respect to required arguments. Break long lines at
Devin Teske [Mon, 3 Aug 2015 21:19:31 +0000 (21:19 +0000)]
Clarify pw(8) manual w/respect to required arguments. Break long lines at
punctuation while here.

Differential Revision: https://reviews.freebsd.org/D2700
Reviewed by: wblock, bapt
MFC after: 3 days
X-MFC-to: stable/10

9 years agoFix bugs spotted by gcc
Baptiste Daroussin [Mon, 3 Aug 2015 06:06:56 +0000 (06:06 +0000)]
Fix bugs spotted by gcc

Reported by: adrian

9 years agoActually set quiet to something.
Adrian Chadd [Mon, 3 Aug 2015 05:59:30 +0000 (05:59 +0000)]
Actually set quiet to something.

/usr/home/adrian/work/freebsd/head-embedded-2/src/usr.sbin/pw/pw_user.c: In function 'pw_user_next':
/usr/home/adrian/work/freebsd/head-embedded-2/src/usr.sbin/pw/pw_user.c:680: warning: statement with no effect

9 years agoUse intmax_t rather than long long
Baptiste Daroussin [Sun, 2 Aug 2015 19:49:24 +0000 (19:49 +0000)]
Use intmax_t rather than long long

9 years agoFix build on 32bits
Baptiste Daroussin [Sun, 2 Aug 2015 13:50:11 +0000 (13:50 +0000)]
Fix build on 32bits

9 years agoSplit some extra long lines
Baptiste Daroussin [Sun, 2 Aug 2015 13:33:17 +0000 (13:33 +0000)]
Split some extra long lines

9 years agoSplit some extra long lines
Baptiste Daroussin [Sun, 2 Aug 2015 13:32:23 +0000 (13:32 +0000)]
Split some extra long lines

9 years agoCleanup a bit includes
Baptiste Daroussin [Sun, 2 Aug 2015 13:22:46 +0000 (13:22 +0000)]
Cleanup a bit includes

9 years agoFix regression: report if a group already exists when creating it
Baptiste Daroussin [Sun, 2 Aug 2015 12:56:25 +0000 (12:56 +0000)]
Fix regression: report if a group already exists when creating it

9 years agoFix regression: report again if a username already exists when creating it
Baptiste Daroussin [Sun, 2 Aug 2015 12:54:15 +0000 (12:54 +0000)]
Fix regression: report again if a username already exists when creating it

9 years agoRemove dead code
Baptiste Daroussin [Sun, 2 Aug 2015 12:48:36 +0000 (12:48 +0000)]
Remove dead code

9 years agoRewrite parsing subcommands arguments of pw(8)
Baptiste Daroussin [Sun, 2 Aug 2015 12:47:50 +0000 (12:47 +0000)]
Rewrite parsing subcommands arguments of pw(8)

Now each subcommands checks its arguments in a dedicated functions.

This helps improving input validation, code readability/maintainability
While here:
- Add a -y option to pw userdel/usermod so it can maintain NIS servers if
  nispasswd is not defined in pw.conf(5)
- Allow pw -r <rootdir> to remove directory with userdel -r
- Fix bug when renaming a user which was not renaming the user name it groups
  it is a member of.
- Only parse pw.conf(5) when needed.

9 years agoRemove things that crept in after badly checked revert
Baptiste Daroussin [Sat, 1 Aug 2015 12:20:55 +0000 (12:20 +0000)]
Remove things that crept in after badly checked revert

9 years agoPartial revert of r286152
Baptiste Daroussin [Sat, 1 Aug 2015 12:18:48 +0000 (12:18 +0000)]
Partial revert of r286152

More work needed on the cli validation

9 years agoFix build
Baptiste Daroussin [Sat, 1 Aug 2015 11:52:48 +0000 (11:52 +0000)]
Fix build

9 years agoFix formatting of new code
Baptiste Daroussin [Sat, 1 Aug 2015 11:31:59 +0000 (11:31 +0000)]
Fix formatting of new code
Fix sorting or errstr
Remove useless initialisation or errstr

Reported by: bde

9 years agoValidate expiration days and password days from commmand line and pw.conf
Baptiste Daroussin [Sat, 1 Aug 2015 10:25:55 +0000 (10:25 +0000)]
Validate expiration days and password days from commmand line and pw.conf

9 years agoValidate the max_uid/max_gid boundaries and entry type in pw.conf
Baptiste Daroussin [Sat, 1 Aug 2015 10:10:13 +0000 (10:10 +0000)]
Validate the max_uid/max_gid boundaries and entry type in pw.conf

9 years agoCast uid/git to uintmax_t when using printf-like functions so the size of
Baptiste Daroussin [Sat, 1 Aug 2015 09:55:47 +0000 (09:55 +0000)]
Cast uid/git to uintmax_t when using printf-like functions so the size of
uid/gid size remains a implementation detail

9 years agoImprove strtounum
Baptiste Daroussin [Thu, 30 Jul 2015 06:14:47 +0000 (06:14 +0000)]
Improve strtounum

Fix many style bugs
Better variable naming
Use C99 'restrict' were apropriate
Fix potential errno race

Submitted by: bde

9 years agoCleanup includes
Baptiste Daroussin [Wed, 29 Jul 2015 23:26:14 +0000 (23:26 +0000)]
Cleanup includes

9 years agoActually set the proper license
Baptiste Daroussin [Wed, 29 Jul 2015 22:51:54 +0000 (22:51 +0000)]
Actually set the proper license

Reported by: trasz

9 years agoActually add the new code
Baptiste Daroussin [Wed, 29 Jul 2015 06:23:06 +0000 (06:23 +0000)]
Actually add the new code

9 years agoCreate a strtounum function using the same API as strtonum
Baptiste Daroussin [Wed, 29 Jul 2015 06:22:41 +0000 (06:22 +0000)]
Create a strtounum function using the same API as strtonum

This function returns uintmax_t
Use this function to convert to gid_t/uid_t

9 years agoReject usermod and userdel if the user concerned is not on the user database
Baptiste Daroussin [Tue, 28 Jul 2015 21:49:38 +0000 (21:49 +0000)]
Reject usermod and userdel if the user concerned is not on the user database
supposed to be manipulated

This prevent pw usermod creating a new local user when requesting to usermod on
a username is defined in LDAP.

This issue only happens when modifying the local user database (not inpacting
commands when -V or -R are used).

PR: 187653
Submitted by: tmwalaszek@gmail.com

9 years agoCheck uid/gid used when creating a user/group are not larger than UID_MAX/GID_MAX
Baptiste Daroussin [Tue, 28 Jul 2015 21:10:58 +0000 (21:10 +0000)]
Check uid/gid used when creating a user/group are not larger than UID_MAX/GID_MAX

PR: 173977
Reported by: nvass@gmx.com

9 years agoFix wrong warning printed after changing or updating NIS users
Baptiste Daroussin [Tue, 28 Jul 2015 20:52:10 +0000 (20:52 +0000)]
Fix wrong warning printed after changing or updating NIS users

PR: 37672
Submitted by: chris+freebsd@chrullrich.de

9 years agowhen -n is passed to any pw subcommand it is always expected to be considered as
Baptiste Daroussin [Tue, 28 Jul 2015 12:20:57 +0000 (12:20 +0000)]
when -n is passed to any pw subcommand it is always expected to be considered as
a name so do not try to convert it to an id if it is a numeric value

PR: 31933
Reported by: ted@impulse.net
Sponsored by: gandi.net

9 years agoReally fix -o
Baptiste Daroussin [Mon, 13 Jul 2015 09:12:05 +0000 (09:12 +0000)]
Really fix -o

9 years agoRegression fix: allow to create users with uid0
Baptiste Daroussin [Mon, 13 Jul 2015 09:08:27 +0000 (09:08 +0000)]
Regression fix: allow to create users with uid0

Reported by: Jan Mikkelsen <janm@transactionware.com>

9 years agoFix logic of check duplicates that has been inverted
Baptiste Daroussin [Mon, 13 Jul 2015 09:07:38 +0000 (09:07 +0000)]
Fix logic of check duplicates that has been inverted

9 years agoEnsure skeldir is abolute path (relatively to the rootdir)
Baptiste Daroussin [Sun, 12 Jul 2015 22:08:58 +0000 (22:08 +0000)]
Ensure skeldir is abolute path (relatively to the rootdir)

9 years agopw -R <rootdir> userdel can now cleanup installation
Baptiste Daroussin [Sun, 12 Jul 2015 21:43:57 +0000 (21:43 +0000)]
pw -R <rootdir> userdel can now cleanup installation

Rewrite rm_r to use *at function, allowing to remove home directories along with
users. only crontabs and at(1) installation are not removed

Relnotes: yes

9 years agoRework the home directory creation and copy or the skel content to use *at
Baptiste Daroussin [Sun, 12 Jul 2015 20:29:51 +0000 (20:29 +0000)]
Rework the home directory creation and copy or the skel content to use *at
functions

This allows to simplify the code a bit for -R by not having to keep modifying
path and also prepare the code to improve support -R in userdel

While here, add regression tests for the functionality

9 years agoMake getarg return NULL if args is NULL
Baptiste Daroussin [Sun, 12 Jul 2015 00:02:43 +0000 (00:02 +0000)]
Make getarg return NULL if args is NULL

9 years agoFix regression: ensure when try to create the group and the user with the same
Baptiste Daroussin [Sat, 11 Jul 2015 23:56:55 +0000 (23:56 +0000)]
Fix regression: ensure when try to create the group and the user with the same
id if possible and nothing in particular was specified

9 years agoRemove now unused variable
Baptiste Daroussin [Sat, 11 Jul 2015 23:17:13 +0000 (23:17 +0000)]
Remove now unused variable

9 years agoReplace custom string array with stringlist(3)
Baptiste Daroussin [Sat, 11 Jul 2015 23:07:17 +0000 (23:07 +0000)]
Replace custom string array with stringlist(3)

9 years agoRework groupmod modification:
Baptiste Daroussin [Sat, 11 Jul 2015 22:35:07 +0000 (22:35 +0000)]
Rework groupmod modification:

Use gr_add(3) when possible to avoid code duplication.
Use a simpler logic to delete members of a group

9 years agoRemove unused argument from pm_passwd
Baptiste Daroussin [Sat, 11 Jul 2015 21:12:28 +0000 (21:12 +0000)]
Remove unused argument from pm_passwd

9 years agocheck the gecos format early: at the moment the -c option is parsed
Baptiste Daroussin [Sat, 11 Jul 2015 21:09:50 +0000 (21:09 +0000)]
check the gecos format early: at the moment the -c option is parsed

9 years agoRemove useless use of goto
Baptiste Daroussin [Sat, 11 Jul 2015 20:18:34 +0000 (20:18 +0000)]
Remove useless use of goto

9 years agoIsolate pw lock/unlock into a separate function
Baptiste Daroussin [Sat, 11 Jul 2015 20:10:12 +0000 (20:10 +0000)]
Isolate pw lock/unlock into a separate function

9 years agohomedir can only be populate during useradd
Baptiste Daroussin [Sat, 11 Jul 2015 19:14:09 +0000 (19:14 +0000)]
homedir can only be populate during useradd

9 years agoMake a separate groupdel/userdel from the main function
Baptiste Daroussin [Sat, 11 Jul 2015 19:07:47 +0000 (19:07 +0000)]
Make a separate groupdel/userdel from the main function

9 years agoMake separate functions to show users and groups
Baptiste Daroussin [Sat, 11 Jul 2015 18:09:27 +0000 (18:09 +0000)]
Make separate functions to show users and groups

9 years agoMove the quiet flag into the configuration structure
Baptiste Daroussin [Sat, 11 Jul 2015 17:01:08 +0000 (17:01 +0000)]
Move the quiet flag into the configuration structure

9 years agoSeparate usernext/groupnext from the main functions
Baptiste Daroussin [Sat, 11 Jul 2015 16:58:47 +0000 (16:58 +0000)]
Separate usernext/groupnext from the main functions

9 years agoDo not try to set password on group if the group is added as a consequence of
Baptiste Daroussin [Thu, 9 Jul 2015 14:14:44 +0000 (14:14 +0000)]
Do not try to set password on group if the group is added as a consequence of
of creating a user (regression from r285136)

Reported by: Fabian Keil <fk@fabiankeil.de>

9 years agopw: fail if an invalid entry is found while parsing master.passwd and group
Baptiste Daroussin [Tue, 7 Jul 2015 21:05:20 +0000 (21:05 +0000)]
pw: fail if an invalid entry is found while parsing master.passwd and group

PR: 198554
Reported by: diaran <fbsd@centraltech.co.uk>
MFC after: 2 days

9 years agoRemove dead code
Baptiste Daroussin [Sun, 5 Jul 2015 10:14:34 +0000 (10:14 +0000)]
Remove dead code

9 years agoAlso validate hours via strptime_l(3)
Baptiste Daroussin [Sun, 5 Jul 2015 10:11:35 +0000 (10:11 +0000)]
Also validate hours via strptime_l(3)

Simplify the code, by only using one parser, ensure the dates (hours and dates)
are valid

9 years agoValidate expiration dates
Baptiste Daroussin [Sun, 5 Jul 2015 09:48:03 +0000 (09:48 +0000)]
Validate expiration dates

Use strptime_l(3) to validate the dates provided in input

9 years agoFix validation of crypted password
Baptiste Daroussin [Sat, 4 Jul 2015 15:56:59 +0000 (15:56 +0000)]
Fix validation of crypted password
Small cleanups

9 years agoAlso validate inputs of pw groupmod -h and groupmod -H
Baptiste Daroussin [Sat, 4 Jul 2015 15:54:11 +0000 (15:54 +0000)]
Also validate inputs of pw groupmod -h and groupmod -H

9 years agoValidate input of pw usermod -h and pwusermod -H
Baptiste Daroussin [Sat, 4 Jul 2015 15:27:04 +0000 (15:27 +0000)]
Validate input of pw usermod -h and pwusermod -H

Push the code that set the password into a separate function to improve
readability

Add regression tests about pw usermod -h and pw usermod -H

9 years agoWhen passwd or group information is changed (by pw, vipw, chpass, ...)
Renato Botelho [Thu, 2 Jul 2015 17:30:59 +0000 (17:30 +0000)]
When passwd or group information is changed (by pw, vipw, chpass, ...)
temporary file is created and then a rename() call move it to official file.
This operation didn't have any check to make sure data was written to disk
and if a power cycle happens system could end up with a 0 length passwd
or group database.

There is a pfSense bug with more infor about it:

https://redmine.pfsense.org/issues/4523

The following changes were made to protect passwd and group operations:

* lib/libutil/gr_util.c:
 - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file
 - After rename(), fsync() call on directory for faster result

* lib/libutil/pw_util.c
 - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file

* usr.sbin/pwd_mkdb/pwd_mkdb.c
 - Added O_SYNC flag on dbopen() calls
 - After rename(), fsync() call on directory for faster result

* lib/libutil/pw_util.3
 - pw_lock() returns a file descriptor to master password file on success

Differential Revision: https://reviews.freebsd.org/D2978
Approved by: bapt
Sponsored by: Netgate

9 years agoMerge from head
Baptiste Daroussin [Mon, 15 Jun 2015 10:56:01 +0000 (10:56 +0000)]
Merge from head

9 years agoChange the documentation to reflect where the -V option should be used
Baptiste Daroussin [Sun, 14 Jun 2015 21:50:38 +0000 (21:50 +0000)]
Change the documentation to reflect where the -V option should be used

Suggested by: kientzle

9 years agoAdd META_MODE support.
Simon J. Gerraty [Sat, 13 Jun 2015 19:20:56 +0000 (19:20 +0000)]
Add META_MODE support.

Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp

9 years agobackout remove of -q option for pw [user|group] next
Baptiste Daroussin [Mon, 8 Jun 2015 05:27:34 +0000 (05:27 +0000)]
backout remove of -q option for pw [user|group] next

While the return code is broken, some corner case usage depends on the
functionnality, so backout until we get better regression tests covering those
corner case usage.

9 years agoFix typo
Baptiste Daroussin [Mon, 8 Jun 2015 05:06:17 +0000 (05:06 +0000)]
Fix typo

9 years agoFix mistakes than came along with r284139
Baptiste Daroussin [Sun, 7 Jun 2015 21:59:43 +0000 (21:59 +0000)]
Fix mistakes than came along with r284139

9 years agoRemove '-q' support for pw [user|group] next
Baptiste Daroussin [Sun, 7 Jun 2015 21:57:20 +0000 (21:57 +0000)]
Remove '-q' support for pw [user|group] next

the intent of -q in this command is to return as exit status the value of the
next group/user id, which does not make sense given exit status are limited to
values between 0 and 255.

9 years agoFix setting uid/gid min/max via pw
Baptiste Daroussin [Sun, 7 Jun 2015 20:59:59 +0000 (20:59 +0000)]
Fix setting uid/gid min/max via pw

9 years agoFix generating configuration file
Baptiste Daroussin [Sun, 7 Jun 2015 20:44:06 +0000 (20:44 +0000)]
Fix generating configuration file

9 years agoFix duplicate checking
Baptiste Daroussin [Sun, 7 Jun 2015 19:59:01 +0000 (19:59 +0000)]
Fix duplicate checking

9 years agoRemove uneeded code (already done by pw_make_v7)
Baptiste Daroussin [Sun, 7 Jun 2015 19:39:06 +0000 (19:39 +0000)]
Remove uneeded code (already done by pw_make_v7)

9 years agoIn case of rename validate the length of the new name
Baptiste Daroussin [Sun, 7 Jun 2015 19:33:25 +0000 (19:33 +0000)]
In case of rename validate the length of the new name

Check early that the new name fits MAXLOGNAME and store it in pwconf

9 years agoRefactor input validation
Baptiste Daroussin [Sun, 7 Jun 2015 19:03:41 +0000 (19:03 +0000)]
Refactor input validation

Mutualize code to validate inputs of both 'user' and 'group' command
Test that the input name fits into MAXLOGNAME

9 years agoFinish converting -7 to pwconf
Baptiste Daroussin [Sun, 7 Jun 2015 15:54:57 +0000 (15:54 +0000)]
Finish converting -7 to pwconf

9 years agoHandle -7 via gloval pwconf
Baptiste Daroussin [Sun, 7 Jun 2015 15:33:08 +0000 (15:33 +0000)]
Handle -7 via gloval pwconf

9 years agoInitialize conf using menset(3)
Baptiste Daroussin [Sun, 7 Jun 2015 15:29:58 +0000 (15:29 +0000)]
Initialize conf using menset(3)

9 years agoHandle pretty print (-P) via global pwconf
Baptiste Daroussin [Sun, 7 Jun 2015 15:27:17 +0000 (15:27 +0000)]
Handle pretty print (-P) via global pwconf

9 years agoHandle dryrun (-N) via global pwconf
Baptiste Daroussin [Sun, 7 Jun 2015 15:09:53 +0000 (15:09 +0000)]
Handle dryrun (-N) via global pwconf

9 years agoSort headers
Baptiste Daroussin [Sun, 7 Jun 2015 14:57:16 +0000 (14:57 +0000)]
Sort headers

9 years agoHandle -C and -Y locally and stop adding them to arglist
Baptiste Daroussin [Sun, 7 Jun 2015 14:54:07 +0000 (14:54 +0000)]
Handle -C and -Y locally and stop adding them to arglist

9 years agoAdd a new global struct pwconf to store etcpath, rootdir and struct userconf
Baptiste Daroussin [Sun, 7 Jun 2015 14:34:38 +0000 (14:34 +0000)]
Add a new global struct pwconf to store etcpath, rootdir and struct userconf

Do not add anymore -R and -V to arglist
Add an error message if both -V and -R are set in arguments

9 years agoFix pw userdel -r not deleting homedir
Baptiste Daroussin [Sun, 7 Jun 2015 14:32:52 +0000 (14:32 +0000)]
Fix pw userdel -r not deleting homedir