summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Avoid possible null deref if ypclnt_new returns nullEitan Adler2012-11-151-0/+305
| | | | | | | PR: bin/172979 Submitted by: Erik Cederstrand <erik@cederstrand.dk> Approved by: cperciva MFC after: 3 days
* Teach pw(8) about how to use pw/gr API to reduce code duplicationBaptiste Daroussin2012-10-3013-88/+1888
| | | | MFC after: 2 months
* backout r242319, racy and not done in the right placeBaptiste Daroussin2012-10-292-18/+0
| | | | Reported by: Garrett Cooper <yanegomi@gmail.com>
* make pw_init and gr_init fail if the specified master password or group file isBaptiste Daroussin2012-10-292-0/+20
| | | | | | a directory. MFC after: 1 month
* Do not treat empty name as an uid 0Baptiste Daroussin2012-10-011-1/+2
| | | | Reported by: Robert Bonomi <bonomi@mail.r-bonomi.com>
* Remove useless atoi(3), previous strspn(3) makes sure that a_name->val is aBaptiste Daroussin2012-10-011-2/+1
| | | | | | | | | number. This also allow pw user show to work as expected. PR: bin/172112 Submitted by: "Ilya A. Arkhipov" <rum1cro@yandex.ru> MFC after: 1 month
* Make sure that each va_start has one and only one matching va_end,Kevin Lo2012-09-281-0/+214
| | | | especially in error cases.
* Remove a reference to CVS and to freefall from a user-facing man page.Isabell Long2012-09-151-0/+479
| | | | | | | PR: docs/171658 Reported by: Chris Petrik (c dot petrik dot sosa at gmail dot com) Approved by: gabor (mentor) MFC after: 5 days
* Revert user comparison back to user names as some user can share uids (root/toorBaptiste Daroussin2012-06-191-6/+13
| | | | | | | | | | | 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
* mdoc: add missing width argument to Bl -tag.Joel Dahl2012-06-031-0/+210
|
* A new jail(8) with a configuration file, ultimately to replace the workJamie Gritton2012-04-260-0/+0
|\ | | | | | | | | | | currently done by /etc/rc.d/jail. MFC after: 3 months
| * A new jail(8) with a configuration file, to replace the work currently doneJamie Gritton2010-10-1948-13002/+0
| | | | | | | | by /etc/rc.d/jail.
* | Remove trailing whitespace per mdoc lint warningEitan Adler2012-03-291-0/+221
| | | | | | | | | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* | When using uidstart in /etc/adduser.conf, get the nextDaniel Eischen2012-02-251-0/+1
| | | | | | | | | | | | | | | | available user id and show it in the "Uid [xxx]" prompt. PR: 163863 Submitted by: Moritz Wilhelmy (mw at wzff dot de) MFC after: 2 weeks
* | Handle NULL return from crypt(3). Mostly from DragonFlyKevin Lo2012-02-221-1/+5
| |
* | readlink len-1Kevin Lo2012-02-141-1/+1
| |
* | Remove unnecessary castKevin Lo2012-02-141-0/+182
| |
* | Detect file modification properly by using tv_nsec.Ed Schouten2012-02-101-1/+2
| | | | | | | | | | | | | | POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond precision to detect file modification. MFC after: 2 weeks
* | Consensus between bde and pjd seemed to be that if the function namesGuy Helmer2012-01-261-8/+8
| | | | | | | | | | | | are lined up, then any * after a long type should appear after the type instead of being in front of the function name on the following line.
* | Make the comments consistent (capitalization, punctuation, andGuy Helmer2012-01-261-6/+10
| | | | | | | | | | | | format). Requested by bde
* | Restore the parenthesis that are necessary around the constant values.Guy Helmer2012-01-261-7/+7
| | | | | | | | Requested by bde.
* | Fix more disorder in prototypes and constants.Guy Helmer2012-01-161-46/+43
| | | | | | | | | | | | Fix header comments for each section of constants. Fix whitespace in #define lines. Fix unnecessary parenthesis in constants.
* | Move struct pidfh definition into pidfile.c, and leave a forward declarationGuy Helmer2012-01-121-12/+6
| | | | | | | | | | | | | | | | | | for pidfh in libutil.h in its place. This allows us to hide the contents of the pidfh structure, and also allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the pidfile_* function prototypes. Suggested by pjd.
* | More prototype formatting fixes, struct member formatting fixes,Guy Helmer2012-01-121-10/+17
| | | | | | | | | | | | and namespace fix for property_find() prototype. Provided by bde.
* | Fix prototype formatting (indentation, long lines, and continued lines).Guy Helmer2012-01-111-23/+30
| | | | | | | | Requested by bde.
* | Fix namespace issues with prototype parameter names.Guy Helmer2012-01-111-32/+32
| | | | | | | | | | | | Add missing prototype parameter names. Requested by bde.
* | Fix forward structure declaration and prototype disorder.Guy Helmer2012-01-111-34/+33
| | | | | | | | Requested by bde.
* | Constify arguments.Pawel Jakub Dawidek2012-01-111-1/+1
| |
* | Add pidfile_fileno() to obtain the file descriptor for an openGuy Helmer2012-01-101-0/+1
| | | | | | | | pidfile.
* | Add new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwdBaptiste Daroussin2012-01-052-1/+16
| | | | | | | | | | | | while here, fix missing parentheses of the return statement of pw_make. Approved by: des (mentor)
* | Spelling fixes for usr.sbin/Ulrich Spörlein2011-12-302-0/+1181
| |
* | - document the -l option to usermodEitan Adler2011-12-221-0/+1008
| | | | | | | | | | | | | | PR: docs/161588 Submitted by: "Luchesar V. ILIEV" <luchesar.iliev@gmail.com> Approved by: gjb MFC after: 1 week
* | In usr.sbin/pw/pw_user.c, use the correct printf length modifier for aDimitry Andric2011-12-171-1/+1
| | | | | | | | | | | | ptrdiff_t. MFC after: 1 week
* | Modify pw_copy:Baptiste Daroussin2011-12-153-1/+1198
| | | | | | | | | | | | | | | | | | | | | | | | | | - if pw is NULL and oldpw is not NULL then the oldpw is deleted - if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid then it renames the user add new gr_* functions so now gr_util API is similar to pw_util API, this allow to manipulate groups in a safe way. Reviewed by: des Approved by: des MFC after: 1 month
* | Mark the structure fields as const.Ed Schouten2011-11-062-0/+141
| | | | | | | | | | This allows us to simply place these strings as constants in the table itself, letting the compiler decide to simply merge duplicate strings.
* | Backout r223115 which potentially caused a POLA violation, by restoringXin LI2011-07-311-1/+1
| | | | | | | | | | | | | | | | historic behavior (create the default base directory in pw.conf) before I came up with a better fix for this. Requested by: nwhitehorn Approved by: re (kib)
* | Don't attempt to create the base directory when -d is specified.Xin LI2011-06-151-0/+1272
| | | | | | | | MFC after: 1 month
* | - Commit work from libprocstat project. These patches add support for runtimeStanislav Sedov2011-05-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file and processes information retrieval from the running kernel via sysctl in the form of new library, libprocstat. The library also supports KVM backend for analyzing memory crash dumps. Both procstat(1) and fstat(1) utilities have been modified to take advantage of the library (as the bonus point the fstat(1) utility no longer need superuser privileges to operate), and the procstat(1) utility is now able to display information from memory dumps as well. The newly introduced fuser(1) utility also uses this library and able to operate via sysctl and kvm backends. The library is by no means complete (e.g. KVM backend is missing vnode name resolution routines, and there're no manpages for the library itself) so I plan to improve it further. I'm commiting it so it will get wider exposure and review. We won't be able to MFC this work as it relies on changes in HEAD, which was introduced some time ago, that break kernel ABI. OTOH we may be able to merge the library with KVM backend if we really need it there. Discussed with: rwatson
* | Don't duplicate define the stdint types.David E. O'Brien2011-05-051-10/+1
| |
* | Add support for IEE/IEC (and now also SI) power of two notions ofXin LI2011-04-121-0/+236
| | | | | | | | | | | | | | | | | | | | prefixes (Ki, Mi, Gi...) for humanize_number(3). Note that applications has to pass HN_IEC_PREFIXES to use this feature for backward compatibility reasons. Reviewed by: arundel MFC after: 2 weeks
* | Merge svn+ssh://svn.freebsd.org/base/head@219553Marcel Moolenaar2011-03-120-0/+0
|\ \
| * | Stop hard-coding default directory mode as 0777.Jung-uk Kim2011-03-084-9/+9
| | |
| * | expand_number() needs uint64_t, declare it here if not already declared.Pawel Jakub Dawidek2011-03-061-0/+5
| | | | | | | | | | | | MFC after: 3 days
| * | Add two new system calls, setloginclass(2) and getloginclass(2). This makesEdward Tomasz Napierala2011-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | it possible for the kernel to track login class the process is assigned to, which is required for RCTL. This change also make setusercontext(3) call setloginclass(2) and makes it possible to retrieve current login class using id(1). Reviewed by: kib (as part of a larger patch)
* | | Merge svn+ssh://svn.freebsd.org/base/head@218816Marcel Moolenaar2011-02-180-0/+0
|\| |
| * | Do not let pw.conf(5) or -M option affect creation of basehome, e.g., /home.Jung-uk Kim2011-02-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the basehome does not exist, it creates all intermediate directories as required, which is logically equivalent to mkdir(1) with -m and -p options. However, it modifies all intermediate directories, not just the final home directory unlike mkdir. This problem was introduced in two revisions, i.e., r1.59 (SVN r167919) and r1.60 (SVN r168044). MFC after: 1 month
| * | Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-112-8/+0
| |/ | | | | | | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* | Merge svn+ssh://svn.freebsd.org/base/head@214309Marcel Moolenaar2010-10-260-0/+0
|\|
| * mdoc: drop redundant .Pp and .LP callsUlrich Spörlein2010-10-081-4/+0
| | | | | | | | They have no effect when coming in pairs, or before .Bl/.Bd
| * Revert the unrelated patch crept in the previous commit.Jung-uk Kim2010-10-051-5/+5
| |