summaryrefslogtreecommitdiffstats
path: root/login-utils/chfn.c
Commit message (Collapse)AuthorAgeFilesLines
* chfn: always use return rather than exit() in mainKarel Zak2012-12-121-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn: clean up exit statusKarel Zak2012-12-121-6/+5Star
| | | | | | | | The old version in some cases (but not always) returns -1 (255) on error. It seems better to cleanup the code and don't return internal return codes by exit(). Signed-off-by: Karel Zak <kzak@redhat.com>
* login-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn: use pathnames.h for pathsSami Kerola2012-03-181-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn: fix coding styleSami Kerola2011-11-291-328/+367
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn, setpwnam: let config.h be in control of extensions in useSami Kerola2011-11-291-2/+0Star
| | | | | | | The autotools will set _GNU_SOURCE which removes necessity to have any _*_SOURCE definition in *.c files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn, chsh: new file pamfail.h for error printingSami Kerola2011-11-291-21/+9Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn, chsh, setpwnam: get true/false from stdbool.hSami Kerola2011-11-231-11/+8Star
| | | | | | Requires C99, which should not be a problem. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn: use libc error printing facilitiesSami Kerola2011-11-231-39/+26Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn: align with howto-usage-function.txtSami Kerola2011-11-231-5/+12
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn: remove non-PAM codeKarel Zak2011-11-031-18/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn: remove non-ANSI definitions [smatch scan]Karel Zak2011-09-131-22/+8Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn: fix compiler warnings [-Wsign-compare]Karel Zak2011-08-011-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: provide alternatives for err, errx, warn and warnxFabian Groffen2011-02-141-1/+1
| | | | | | | | Solaris lacks err, errx, warn and warnx. This also means the err.h header doesn't exist. Removed err.h include from all files, and included err.h from c.h instead if it exists, otherwise alternatives are provided. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* build-sys: improve check for cryptFabian Groffen2011-01-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Check for crypt.h existence, and use it if available over using unistd.h for which a certain feature level has to be set to export a definition for crypt. On Solaris this set causes a standards conflict in the headers, because at the time of this check C99 mode is already enabled, which implies certain standards non-compatible with _XOPEN_SOURCE. 92 #define _XOPEN_SOURCE 93 #include <unistd.h> configure:16259: gcc -std=gnu99 -c -g -O2 conftest.c >&5 In file included from /usr/include/unistd.h:18, from conftest.c:93: /prefix/gentoo/usr/lib/gcc/i386-pc-solaris2.10/4.4.5/include-fixed/sys/feature_tests.h:341:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications" configure.ac: improve crypt check login-utils/my_crypt.h: replace old GNU_LIBRARY check with autoconf define for crypt.h [kzak@redhat.com: - remove my_crypt.h] Signed-off-by: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn: Use EXIT_* and err()Marek Polacek2010-12-101-82/+45Star
| | | | | | [kzak@redhat.com: - clean usage() calls and some error messages] Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
* lib: [strutils] general purpose string handling functionsDavidlohr Bueso2010-11-231-1/+1
| | | | | | | | | | | | | This patch replaces a few functions used throughout the source: * Renames getnum (from schedutils) to strtol_or_err * Moves strtosize (from lib/strtosize.c) * Moves xstrncpy (from include/xstrncpy.h) * Adds strnlen, strnchr and strndup if not available (remove it from libmount utils) A few Makefile.am files were modified to compile accordingly along with trivial renaming in schedutils source code. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* chsh: don't suggest ypchshKarel Zak2010-07-291-2/+1Star
| | | | | | | | | | $ chsh chsh: can only change local entries; use ypchsh instead. The 'ypchsh' is an external util that does not have to be installed. Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=497329 Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn: several strings without gettext callsKarel Zak2008-12-121-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Revert "login-utils: several strings without gettext calls"Karel Zak2008-12-121-4/+4
| | | | | | | This reverts commit 64fefaf5bffdd4041190f1e5ed4b5d0100638c0d. It does not make sense to localize config options (wdays in checktty.c) and debug messages (main() in checktty.c.
* login-utils: several strings without gettext callsPedro Ribeiro2008-10-031-4/+4
| | | | | Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* selinux: is_selinux_enabled() returns 0, 1 and -1Karel Zak2008-07-011-1/+1
| | | | | | | | | | Unfortunately, the current libselinux implementation of is_selinux_enabled() returns -1 on error. This behavior is undocumented. The proper solution is to use "if (is_selinux_enabled() > 0)". Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn, chsh, login: collapsing three similar messages into a single oneBenno Schulenberg2008-04-161-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* chfn: add pam_end() call and cleanup PAM codeKarel Zak2007-10-041-23/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-071-9/+9
|
* Imported from util-linux-2.12i tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.12a tarball.Karel Zak2006-12-071-0/+27
|
* Imported from util-linux-2.11o tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-3/+3
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-20/+11Star
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-7/+5Star
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-2/+0Star
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-28/+36
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-3/+14
|
* Imported from util-linux-2.8 tarball.Karel Zak2006-12-071-6/+4Star
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-12/+73
|
* Imported from util-linux-2.5 tarball.Karel Zak2006-12-071-10/+28
|
* Imported from util-linux-2.2 tarball.Karel Zak2006-12-071-0/+414