Commit Graph

  • 528346cb3b When a password is moved to the gshadow file, use "x" instead of "x" to indicate that the password is shadowed (consistency with grpconv). nekral-guest 2008-02-26 20:09:56 +0000
  • f43a4659c6 Re-indent. nekral-guest 2008-02-26 19:17:20 +0000
  • 2a2b2b3aa4 * NEWS: Fix failures when the gshadow file is not present. Thanks to Christian Henz (http://bugs.debian.org/467488) * src/gpasswd.c (get_group): Do not fail if gshadow is not present. Just use the group file and set the grent structure * src/gpasswd.c (check_perms): The permissions should be checked using both the gshadow and group file. Add a <struct group *> parameter, and check if the gshadow file exists (is_shadowgrp). * src/gpasswd.c (main): Do not use sgent.sg_mem or sgent.sg_adm if the gshadow file is not present (sgent is not initialized in that case). The fields of sgent can be set, but not used. nekral-guest 2008-02-26 19:09:10 +0000
  • db479122f3 * Fix typo in comment. * Move comment regarding FIRST_MEMBER_IS_ADMIN to where it belongs. * Indicate the end of the #ifdef FIRST_MEMBER_IS_ADMIN section. nekral-guest 2008-02-26 18:59:28 +0000
  • 4160d8c1fb Add the new XML documentation files to EXTRA_DIST. nekral-guest 2008-02-25 21:46:27 +0000
  • dead78e4d9 Use --previous when merging PO files of the manpages. (I need to find a way to do it for the PO files of the binaries) nekral-guest 2008-02-25 21:27:31 +0000
  • 7ce94164c7 * man/login.defs.d/SYS_UID_MAX.xml, man/login.defs.d/SYS_GID_MAX.xml: Document new variables. * man/newusers.8.xml, man/login.defs.5.xml, man/login.defs.d/GID_MAX.xml, man/login.defs.d/UID_MAX.xml: newusers uses now the GID_MAX, GID_MIN, UID_MAX, UID_MIN, SYS_GID_MAX, SYS_GID_MIN, SYS_UID_MAX, and SYS_UID_MIN variables. * man/groupadd.8.xml, man/login.defs.5.xml: groupadd uses now the SYS_GID_MAX, and SYS_GID_MIN variables. * man/login.defs.5.xml: useradd uses now the SYS_GID_MAX, SYS_GID_MIN, SYS_UID_MAX, and SYS_UID_MIN variables. nekral-guest 2008-02-25 21:17:18 +0000
  • 77f722ae9d Added missing SYS_GID_MAX, SYS_GID_MIN, SYS_UID_MAX, and SYS_UID_MIN. nekral-guest 2008-02-25 21:06:30 +0000
  • 93e2f66a60 * NEWS, src/useradd.c, man/useradd.8.xml: Added options -user-group (-U, Uflg) and --no-user-group (-N, Nflg) to replace nflg. * man/login.defs.d/USERGROUPS_ENAB.xml: useradd now also uses USERGROUPS_ENAB. nekral-guest 2008-02-25 21:03:46 +0000
  • 2a5c015cd1 Add missing 'p' to the getopt_long's optstring. nekral-guest 2008-02-19 21:26:04 +0000
  • dc641054a1 Add missing -p, --password description to the Usage message. nekral-guest 2008-02-19 21:21:52 +0000
  • 23ac189d48 Add missing space in comment. nekral-guest 2008-02-19 21:18:04 +0000
  • 29e71bf1b3 Fix --non-unique's has_arg field to no_argument instead of required_argument. nekral-guest 2008-02-19 21:16:28 +0000
  • 7ec4a64cdb Add missing 'p' to the getopt_long's optstring. nekral-guest 2008-02-19 21:10:17 +0000
  • c81db0b178 Fix alphabetical order. nekral-guest 2008-02-19 21:05:44 +0000
  • bb824221a4 This entry was for login, not su: * If started as init, start a new session. nekral-guest 2008-02-19 21:04:55 +0000
  • ca2636f08a Re-indent. nekral-guest 2008-02-19 21:02:24 +0000
  • 18c914f086 Added new option -r, --system for system accounts in useradd, groupadd, and newusers. nekral-guest 2008-02-19 21:01:38 +0000
  • ed52b88b92 Fix buffer overflow when adding an user to a group. Thanks to Peter Vrabec. nekral-guest 2008-02-18 21:36:03 +0000
  • 280fcebae8 Change the default HOME directory in /etc/default/useradd according FHS (/home instead of /home/users). This fixes Alioth's bug #310559. Thanks to Dale E. Edmons. nekral-guest 2008-02-17 15:29:41 +0000
  • 80ef1db3b3 One AUDIT_USER_START remained. Replace it with AUDIT_CHGRP_ID also. nekral-guest 2008-02-14 18:51:37 +0000
  • a8bc585e33 Use the correct AUDIT_CHGRP_ID event instead of AUDIT_USER_START, when changing the user space group ID with newgrp or sg. Thanks to sgrubb@redhat.com for the patch. nekral-guest 2008-02-14 18:35:51 +0000
  • 1599d3d128 * Reset oflg with uflg if the new UID is equal to the old one. * Reset mflg with dflg if the new home directory is the same as the old one. nekral-guest 2008-02-10 21:35:17 +0000
  • a5f949165a Fix the handling of -a when a user is being renamed (with -l). The new name of the user was used for the new supplementary groups, but not in the existing ones. nekral-guest 2008-02-10 20:25:39 +0000
  • ead95673a5 Set the shadow's password instead of the passwd's password. Fix wrong cut&paste. nekral-guest 2008-02-10 19:14:20 +0000
  • 132eb55983 Fix typo. nekral-guest 2008-02-03 21:53:30 +0000
  • f08833fba2 Fix typo. nekral-guest 2008-02-03 21:42:08 +0000
  • f8679b385a No need to check audit_fd, audit_logger() will take care of this. nekral-guest 2008-02-03 21:40:01 +0000
  • ae5db5d36b Really log the expiration date change as human readable strings instead of integers. nekral-guest 2008-02-03 21:37:45 +0000
  • fdae41eb63 Use a function to convert the dates from /etc/shadow to human readable dates. nekral-guest 2008-02-03 21:30:47 +0000
  • 25433a17e7 TODO cleanup - newusers: i = 100; not a nice initial value, use login.defs This is done. newusers now uses (UID|GID)_(MIN|MAX) - remove the entries regarding outdated translation of documentation. The manpages translation should use the PO. - the manpages should mention when the options were added. This should help user to choose option for portable scripts nekral-guest 2008-02-03 18:51:11 +0000
  • 737806a53a Add ideas for new tests in the testsuite. nekral-guest 2008-02-03 17:58:16 +0000
  • feb2e41181 Do not translate the fromhost variable. It is always used for syslog messages. nekral-guest 2008-02-03 17:57:43 +0000
  • 6e9078f16c Switch to the C locale before sending messages to syslog. The messages sent by shadow were not translated, but error messages from PAM returned by pam_strerror() were translated in the users's locale. nekral-guest 2008-02-03 17:53:21 +0000
  • 4e01ea6c33 * NEWS: newusers will behave more like useradd. * src/newusers.c: The user's ID must be found before the group ID to mimic useradd's behavior choices of UID and GID. * src/newusers.c: Reuse the generic find_new_uid() and find_new_gid() functions. This permits to respect the UID_MIN/UID_MAX and GID_MIN/GID_MAX variables, should * src/newusers.c: Check if the user or group exist using the external databases (with the libc getpwnam/getgrnam functions). Refuse to update an user which exist in an external database but does not exist in the local database. * src/newusers.c: Check the usernames and groupnames with check_user_name() and check_group_name() * src/newusers.c: Use isdigit() for readability. * src/newusers.c: Check if numerical IDs are valid (no remaining chars). nekral-guest 2008-02-03 17:45:58 +0000
  • 65ed10d75c Do not seed the random number generator each time, and use the time in microseconds to avoid having the same salt for different passwords generated in the same second. This permits to avoid using the same salt for different passwords in newusers. nekral-guest 2008-02-03 17:23:58 +0000
  • aed929ae90 Add libmisc/find_new_ids.c to the sources of the libmisc library. nekral-guest 2008-02-03 16:57:21 +0000
  • 04190741e7 Use the find_new_uid() and find_new_gid() from the library instead of the local functions. nekral-guest 2008-02-03 16:56:23 +0000
  • 72cfa974d8 Add libmisc/find_new_ids.c to the sources of the libmisc library. nekral-guest 2008-02-03 16:55:37 +0000
  • a1ae1c4fba The new libmisc/find_new_ids.c file contains translatable strings. nekral-guest 2008-02-03 16:53:53 +0000
  • e21f90fd68 Add new generic functions to find the next user or group ID available: find_new_uid() and find_new_gid(). They work the same way as the functions with the same name of useradd or groupadd, except that they check in the local database to make sure an ID was not reserved in an uncommitted change (this is needed to be used in newusers), they report a status instead of calling exit(), and they can receive a preferred ID. They should later support system IDs. This should be a little bit slower, but not too much (if the database is not open the checks against the local database will exit immediately, and if it is already open, all the checks will be done regarding the data in memory). nekral-guest 2008-02-03 16:53:07 +0000
  • be7c51d27a New function to find a group by its GID on the local database. nekral-guest 2008-02-03 16:51:08 +0000
  • 7344e055be New function to find an user by its UID on the local database. nekral-guest 2008-02-03 16:50:14 +0000
  • 57f713e426 * libmisc/age.c, libmisc/yesno.c, src/lastlog.c, src/grpck.c, src/chfn.c, src/passwd.c, src/chage.c, src/login.c, src/sulogin.c, src/chsh.c: Fix call to puts (remove end of line, or use fputs). * po/*.po: Unfuzzy PO files according to above change. nekral-guest 2008-02-03 16:28:03 +0000
  • 5672b53263 French translation update (obvious things only) bubulle 2008-02-03 06:20:06 +0000
  • e899b34160 Updated PO files. nekral-guest 2008-02-02 17:20:42 +0000
  • 3755086645 Fix comment. find_new_fid is no more called is the user specified a group ID. nekral-guest 2008-01-27 14:31:23 +0000
  • ae99674e9b Fix build failures with --disable-shadowgrp. Thanks to Jürgen Daubert for the patch. * libmisc/salt.c: Include <stdio.h>, needed for stderr and printf functions. * lib/encrypt.c: Include <stdio.h>, needed for perror, stderr and printf functions * src/usermod.c: sgr_locked exists only if SHADOWGRP is defined. * src/chgpasswd.c: Only check is the gshadow file exists if SHADOWGRP is defined. nekral-guest 2008-01-26 17:41:20 +0000
  • 28a9441f4f Replace printf by puts for fixed strings. This would avoid issues caused by formats introduced in translated strings. nekral-guest 2008-01-24 21:07:14 +0000
  • 8c229ea473 Re-indent. nekral-guest 2008-01-24 20:54:42 +0000
  • 3dd5866244 Replace printf by puts for fixed strings. This would avoid issues caused by formats introduced in translated strings. nekral-guest 2008-01-24 20:42:12 +0000
  • 96f7a7588f Re-indent. nekral-guest 2008-01-24 19:50:09 +0000
  • 01f9705dd5 Replace printf by puts for fixed strings. This would avoid issues caused by formats introduced in translated strings. nekral-guest 2008-01-24 19:38:06 +0000
  • 1b246725c5 Re-indent. nekral-guest 2008-01-24 19:24:03 +0000
  • de239d9b01 Replace printf by puts for fixed strings. This would avoid issues caused by formats introduced in translated strings. nekral-guest 2008-01-24 18:39:05 +0000
  • f4b9f1b2e0 adduser was a typo. Move the adduser entries to the useradd section. nekral-guest 2008-01-23 23:48:39 +0000
  • 926aeec06a Apply Christian's recommendation: s/can't get unique/no more available/ nekral-guest 2008-01-23 22:31:38 +0000
  • 934ac07b06 Check that the new fields set with -u, -s, -l, -g, -f, -e, -d, and -c differ from the old ones. If a requested new value is equal to the old one, no changes will be performed for that field. If no fields are changed, usermod will exist successfully with a warning. This avoids logging changes to syslog when there are actually no changes. nekral-guest 2008-01-23 21:50:27 +0000
  • 0d1be15e0f Always define user_newcomment, user_newshell, user_newexpire, and user_newinactive. It is more simple to always have user_<x> as the old field, and user_new<x> as the new field (even if the field did not change) instead of changing the algorithm depending on WITH_AUDIT. nekral-guest 2008-01-23 21:19:08 +0000
  • 294e3a632e user_newname can only be used in WITH_AUDIT code or when lflg is set. This issue was introduced in the code refactoring of usermod. nekral-guest 2008-01-23 20:08:16 +0000
  • 229e6cbdd8 Fix typo in comment: s/find_new_uid/find_new_gid/ nekral-guest 2008-01-22 22:59:06 +0000
  • 53561134a9 * s/gid/GID/ in message string. * Set this string for translation. nekral-guest 2008-01-22 22:57:55 +0000
  • 7535467358 * man/grpck.8.xml: Conditionally include the parts mentioning the gshadow file (based on SHADOWGRP). * man/grpck.8.xml: Add reference to the gshadow(5) manpage (conditionally included). nekral-guest 2008-01-22 21:42:48 +0000
  • 20153121be Fix typo. Remove "the" from "All entries in the <filename></filename> are checked [...]" nekral-guest 2008-01-22 21:15:58 +0000
  • caf3f2603e Indicate that the shadow parameter is optional (i.e. a passwd file can be specified without a shadow file, and the group file can be specified without the gshadow file). nekral-guest 2008-01-22 21:13:43 +0000
  • 03e5a3a181 Document the options with a list of options, as in the pwck(8) manpage. nekral-guest 2008-01-22 20:56:13 +0000
  • ae8cbbc34d * NEWS, src/newgrp.c: Fix segfault when an user returns to an unknown GID (either the user was deleted during the user's newgrp session or the user's passwd entry referenced an invalid group). Add a syslog warning in that case. * src/newgrp.c: Add an end of line when reporting an invalid password. nekral-guest 2008-01-21 23:33:43 +0000
  • b082ebead2 * NEWS, src/useradd.c: Fix the handling of the --defaults option (it required an argument, but should behave as -D) * NEWS, man/useradd.8.xml: Document the --defaults option, which was already described in the useradd's Usage information. nekral-guest 2008-01-12 21:09:46 +0000
  • 85febc5729 Avoid setting the password to a const empty string, but set the first char to \0. This avoids a warning. nekral-guest 2008-01-06 19:26:58 +0000
  • e663f6c0b4 * libmisc/salt.c: Add prototype for l64a(), gensalt(), SHA_salt_size(), and SHA_salt_rounds(). * libmisc/salt.c: l64a() and gensalt() are static. * libmisc/salt.c: The `meth' parameter of crypt_make_salt() is a const. (ditto for the method variable). * libmisc/salt.c: SHA_salt_rounds returns a const string. * libmisc/salt.c: Avoid warnings with cast of random() to double. * libmisc/salt.c: Replace rand() by random(). nekral-guest 2008-01-06 14:50:26 +0000
  • 8a1abbe80b * lib/Makefile.am: Do not link libshadow.la with the intl, crypt, skey and md libraries... * src/Makefile.am: ...Specify for each binary which library is required. skey and md are required for the binaries with authentication of the user (chfn, chsh, login, passwd, su). intl is required for all. mcrypt is required for user (chfn, chsh, login, passwd, su, sulogin) and group (newgrp, gpasswd) authentication and for the creation of passwords (chpasswd, chgpasswd, gpasswd, newusers, passwd). nekral-guest 2008-01-06 14:19:32 +0000
  • 39c9007f67 * lib/nscd.c, lib/nscd.h: Set the service parameter of nscd_flush_cache() to const. This avoids a lot of warnings. * lib/nscd.c: Include "nscd.h" to avoid inconsistent prototypes. nekral-guest 2008-01-06 13:57:17 +0000
  • ee268550d9 Remove prototypes for __gr_dup() and __gr_set_changed(). nekral-guest 2008-01-06 13:52:21 +0000
  • e5b7987764 Set the method string as a constant string. nekral-guest 2008-01-06 13:49:00 +0000
  • 06691758e8 Assume <errno.h> declares errno. nekral-guest 2008-01-06 13:42:47 +0000
  • 1d63dfd1d4 * Remove prototype for sgetgrent(). * Add the name of the parameters for merge_group_entries() and split_groups(). nekral-guest 2008-01-06 13:38:16 +0000
  • 9d6d2de4d3 Fix typo: s/rend compte indiqué/rend le compte indiqué/ nekral-guest 2008-01-06 13:32:25 +0000
  • 9104a7a4a4 * Remove prototype of check_su_auth(). It is redundant with prototypes.h. * isgrp() is static. nekral-guest 2008-01-06 13:30:18 +0000
  • 1520a0ae3e * libmisc/obscure.c: Tag the old' parameter of palindrome(), similar(), and simple() as unused. * libmisc/loginprompt.c: Tag the sig' parameter of login_exit() as unused. * src/expiry.c: Tag the sig' parameter of catch_signals() as unused. * src/su.c: Tag the sig' parameter of catch_signals() as unused. * src/su.c: Add int parameter to the prototype of oldsig(). * src/login.c: Tag the sig' parameter of alarm_handler() as unused. * src/sulogin.c: Tag the sig' parameter of catch_signals() as unused. * libmisc/getdate.y: Tag the `string' parameter of yyerror() as unused. * libmisc/getdate.y: The string provided to yyerror() is const. * libmisc/getdate.y: Fix the prototypes of yylex() and yyerror(). nekral-guest 2008-01-06 13:20:25 +0000
  • 7b22265d4e * Remove teh macro definition of SETXXENT_TYPE, SETXXENT_RET, and SETXXENT_TEST. They were used by the now removed pwent.c and grent.c. * Remove the definition of PASSWD_PAG_FILE, GROUP_PAG_FILE, SHADOW_PAG_FILE, and SGROUP_PAG_FILE. They are never used. * Don't include "snprintf.h". The file does not exist in shadow. * Add new macro unused to tag unused parameters. nekral-guest 2008-01-06 13:12:09 +0000
  • 116a76e528 Remove prototypes for __pw_del_entry(), __pw_get_head(), __spw_del_entry(), and __spw_get_head(). nekral-guest 2008-01-06 13:00:17 +0000
  • 93177a5615 Assume optarg and optind are declared in <getopt.h>. nekral-guest 2008-01-06 12:52:23 +0000
  • 0c867d23ad Remove the pw_name argument of new_pw_passwd. Use the user_newname global variable instead. This avoid using a parameter with the same name as a function. nekral-guest 2008-01-06 12:50:22 +0000
  • 5c6f68cd8f * Removed unused gid parameter of syslog_sg(). * The loginname and tty buffers are never changed. Add the const qualifier. nekral-guest 2008-01-06 12:31:06 +0000
  • d85b926a14 The crypt_method string always points to a constant string. Add the const qualifier. nekral-guest 2008-01-06 12:26:20 +0000
  • 8289eabc55 Remove prototype of l64a() (not used in pwunconv). nekral-guest 2008-01-06 12:12:30 +0000
  • 58176a821d Remove prototypes for __gr_del_entry(), __gr_get_head(), __sgr_del_entry(), and __sgr_get_head(). nekral-guest 2008-01-06 12:09:38 +0000
  • 4cdbd1fa1d * src/login_nopam.c: Use an ANSI prototype for resolve_hostname() instead of K&R prototype. * src/login_nopam.c: Fix the prototypes of list_match(), user_match(), from_match(), string_match(). There were no parameters in the prototypes. * src/login_nopam.c: Fix the prototypes of the function parameter match_fn of list_match(). nekral-guest 2008-01-06 12:07:42 +0000
  • 0e07f3e48d Remove the src parameter of copy_special(). The entry's information are taken from the stat structure. nekral-guest 2008-01-06 12:02:24 +0000
  • 569a3b8e59 * libmisc/console.c, libmisc/ulimit.c, lib/sgetgrent.c, lib/sgetpwent.c: Include "prototypes.h" to make sure the exported prototypes are the ones used for the definition of functions. * lib/prototypes.h: Added prototypes for __gr_del_entry(), __gr_get_db(), __gr_get_head(), __gr_set_changed(), __gr_dup(), __pw_del_entry(), __pw_get_db(), __pw_get_head(), __pw_dup(), sgetgrent(), sgetpwent(), __sgr_del_entry(), __sgr_dup(), __sgr_get_head(), __sgr_set_changed(), __spw_get_head(), __spw_del_entry(), __spw_dup(). * lib/prototypes.h: Removed prototype for is_listed(). * lib/prototypes.h: Added name of the check_su_auth()'s parameters. * lib/groupio.h: Removed prototypes for __gr_dup() and __gr_set_changed(). * lib/sgroupio.c: Removed prototypes for putsgent(), sgetsgent(), and __gr_get_db(). * lib/sgroupio.h: Removed prototypes for __sgr_dup() and __sgr_set_changed(). * lib/shadowio.c: Removed prototype for __pw_get_db(). * lib/pwio.c: Removed prototype for sgetpwent() and putpwent(). * lib/shadowio.h: Removed prototypes for __spw_dup() and __spw_set_changed(). * lib/pwio.h: Removed prototypes for __pw_dup() and __pw_set_changed(). * lib/commonio.h: Add protection against multiple inclusions. * lib/prototypes.h: Include commonio.h (needed for the __xx_del_entry() functions). nekral-guest 2008-01-06 11:59:01 +0000
  • 747e174bec Add documentation for the new --password options. nekral-guest 2008-01-05 17:25:00 +0000
  • ff49a02023 Fix find_new_gid() prototype. Add a void parameter. nekral-guest 2008-01-05 17:23:46 +0000
  • 9c7ddf94c9 Remove old comments in the header. nekral-guest 2008-01-05 17:22:38 +0000
  • 050364aba2 Include <lastlog.h> for the declaration of struct lastlog. nekral-guest 2008-01-05 17:20:45 +0000
  • 23e8564812 Fix typos. nekral-guest 2008-01-05 16:44:51 +0000
  • 462be08456 * lib/prototypes.h: Add the dolastlog() prototype. * lib/prototypes.h: Typo: login.c -> loginprompt.c * src/login.c: Remove declaration of dolastlog(). * libmisc/log.c: dolastlog() should not have been changed to static. Include prototypes.h instead. nekral-guest 2008-01-05 16:44:28 +0000
  • db0dddc6e9 * libmisc/pwdcheck.c: Do not include <pwd.h>. Include <shadow.h> and "pwauth.h" only when compiled without PAM support. * src/chfn.c, src/chsh.c: Do not include <shadow.h> * lib/commonio.c: Do not include <shadow.h>. Do not include <pwd.h>. Include "nscd.h" instead of <nscd.h>. * configure.in: Do not check if shadow.h exist, but make sure it exists. * libmisc/pwdcheck.c, src/chfn.c, src/chsh.c, lib/defines.h, lib/shadowmem.c, lib/shadowio.c, lib/commonio.c: HAVE_SHADOW_H is no more needed (shadow.h should always exist). nekral-guest 2008-01-05 16:33:43 +0000
  • cea5c823a1 Fix the do_pam_passwd() prototype (it returns void). nekral-guest 2008-01-05 15:43:33 +0000
  • 5a4848c8cc do_pam_passwd should not have been defined static, prototypes.h needed to be included instead. nekral-guest 2008-01-05 15:41:58 +0000
  • 6cf5b05493 Remove prototype of putgrent(), add parameter's name of sgetgrent(). nekral-guest 2008-01-05 14:35:13 +0000