summaryrefslogtreecommitdiffstats
path: root/winsup/utils/passwd.c
Commit message (Collapse)AuthorAgeFilesLines
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-4/+1
| | | | | | | | | | | | | | Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * passwd.c (GetPW): If server is NULL, and the user is not a localCorinna Vinschen2014-11-241-14/+32
| | | | | | | | user, try to fetch the DC to use as server. (ChangePW): Get Windows username via extra parameter. (usage): Reduce -d help text to reflect above change. (main): Fix typo in comment. Call GetPW and ChangePW as per the changes above.
* * passwd.c (usage): Rename DAYS to MINDAYS and MAXDAYS.Corinna Vinschen2014-08-061-19/+14
| | | | * utils.xml (passwd): Ditto.
* * passwd.c (main): Fix typo in error output.Corinna Vinschen2014-06-161-1/+2
|
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-10/+11
|
* Update copyrightsChristopher Faylor2013-01-211-1/+2
|
* * passwd.cc: Add -v option to print version information as well, sinceCorinna Vinschen2012-02-091-2/+4
| | | | it's used in older csih.
* Clean up whitespace.Christopher Faylor2011-12-171-64/+64
|
* * Align usage output, version output, as well as usage and versionCorinna Vinschen2011-10-101-38/+20
| | | | | | | | | option handling to use the same style throughout all Cygwin utils. Throughout use program_invocation_short_name to refer to current process name in Cygwin executables. * utils.sgml: Align documentation to above change. Add missing sections for getconf, ldd, and setmetamode. * strace.cc (proc_child): Avoid compiler warning.
* * passwd.c (main): Add the ability to specify a username for the -RCorinna Vinschen2011-04-041-6/+24
| | | | | command. * utils.sgml: Document the aforementioned change.
* * cygpath.cc (main): Only setlocale for LC_CTYPE category. FallbackCorinna Vinschen2009-05-151-2/+4
| | | | | | | | to UTF-8 if locale is "C". * ldd.cc (main): Ditto. * mkgroup.c (main): Ditto. * mkpasswd.c (main): Ditto. * passwd.c (main): Ditto.
* * passwd.c (usage): Change description for -d option according toCorinna Vinschen2009-03-231-2/+4
| | | | | | previous change. (main): Fix typo. * utils.sgml: Add missing description for passwd -d option.
* * passwd.c (caller_is_admin): New function to test if calling userCorinna Vinschen2009-03-231-19/+59
| | | | | | | | | is an administrator by inspecting user token. (main): Drop fetching caller info from logonserver. Only fetch server from environment when trying to change password for own account. Drop admin check entirely in case of doing account maintainance. Otherwise replace check for admin by result of caller_is_admin call.
* * passwd.c (main): Always get logonserver from environment andCorinna Vinschen2009-03-221-3/+6
| | | | use when fetching user info for caller.
* * ldd.cc: Fix compiler warning.Corinna Vinschen2009-03-221-20/+21
| | | | | | * passwd.c: Use mbstowcs instead of MultiByteToWideChar throughout. (main): Call setlocale. Fix a bug in fetching the logon server from the environment.
* ChangeLog:Corinna Vinschen2009-01-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Remove --enable-server option. Allways add the cygserver directory to $SUBDIRS. * configure: Regenerate. cygwin/ChangeLog: Remove USE_SERVER define. Accommodate throughout. * configure.in: Remove --enable-server option. * configure: Regenerate. * environ.cc: Remove CYGWIN=server setting. cygserver/ChangeLog: * client.cc (allow_server): Remove variable. (client_request_get_version::client_request_get_version): Drop checking allow_server. utils/ChangeLog: * passwd.c: Remove CYGWIN=server requirement from usage text. doc/ChangeLog: * cygserver.sgml: Remove the "How to use the Cygserver services" section. * cygwinenv.sgml: Move "(no)server" to the removed options section. * faq-programming.xml: Remove CYGWIN=server requirement for running the Cygwin testsuite. * ntsec.sgml: Ditto for using `passwd -R'.
* * passwd.c (main): Put how to delete the registry password on its ownCorinna Vinschen2008-12-151-1/+2
| | | | line in passwd -R output.
* * passwd.c (longopts): Add --reg-store-pwd option.Corinna Vinschen2008-11-261-17/+64
| | | | | | | | (opts): Add -R option. (usage): Add text for -R/--reg-store-pwd option. (main): Fix size of local user and password string arrays. Handle -R option. * utils.sgml: Add text for passwd -R/--reg-store-pwd option.
* * passwd.c (longopts): Add --logonserver option.Corinna Vinschen2005-08-181-19/+50
| | | | | | | | | | | | (opts): Add -d option. (GetPW): Add server parameter which is given to Net functions. (ChangePW): Ditto. (PrintPW): Ditto. (SetModals): Ditto. (usage): Add description for -d/--logonserver option. (main): Add option handling for -d/--logonserver. Use LOGONSERVER environment variable content for server to contact, unless -d/--logonserver option is given. If both is missing, use NULL.
* * mkgroup.c: Avoid compiler warnings throughout.Corinna Vinschen2003-11-141-3/+3
| | | | | * mkpasswd.c: Ditto. * passwd.c: Ditto.
* * passwd.c (PrintPW): Turn around meaning printed for "Password notCorinna Vinschen2003-11-041-11/+15
| | | | | | required" option to be in line with Windows meaning. (main): Use more appropriate 1008 option when calling NetUserSetInfo to change flag values.
* * passwd.c (UF_LOCKOUT): Remove (defined in lmaccess.h).Corinna Vinschen2003-11-041-35/+118
| | | | | | | | | | | | | | | (version): Bump version number to 1.5. (longopts): Add -c, -C, -e, -E, -p, -P options. (opts): Ditto. (PrintPW): Print values of UF_PASSWD_CANT_CHANGE and UF_DONT_EXPIRE_PASSWD flags. Slightly reformat output. Don't suppress correct system password settings just because the account has admin privileges. (usage): Define as "noreturn" function. Restructure and rephrase output. Accomodate new options. (print_version): Fix copyright dates. (main): Accomodate new options for setting UF_PASSWD_CANT_CHANGE, UF_DONT_EXPIRE_PASSWD and UF_PASSWD_NOTREQD settings.
* * cygcheck.cc (usage) Add description output.Joshua Daniel Franklin2003-04-261-0/+1
|
* Add final newlines to utilsJoshua Daniel Franklin2002-09-151-1/+2
|
* * passwd.c: Rearrange includes to avoid unnecessary warnings.Corinna Vinschen2002-06-141-15/+35
| | | | | | | | | | | | (GetPW): Add parameter to (dis)allow printing of Windows username. Use defines instead of numerical constants where possible. Try avoiding impersonation problem. Rearrange to print Windows username only if it's different from Cygwin username. (ChangePW): Use defines instead of numerical constants where possible. (main): Call GetPW with additional parameter. Change error text. * passwd.c (GetPW): Handle case of user-edited /etc/passwd with cygwin_internal (CW_EXTRACT_DOMAIN_AND_USER, ...).
* * passwd.c (prog_name): New global variable.Corinna Vinschen2002-05-291-39/+105
| | | | | | | | (longopts): Ditto. (opts): Ditto. (usage): Standardize output. Accomodate new options. (print_version): New function. (main): Accomodate longopts and new --help, --version options.
* * mkgroup.c (usage): Use one just fprintf + string concatenation for outputChristopher Faylor2002-03-191-1/+1
| | | | | message. (print_version): Add void to function type and update copyright.
* * passwd.cc (ChangePW): Add parameter to differ between called forCorinna Vinschen2002-01-301-4/+6
| | | | | | | checking old password and called for changing password. If called for checking old password, return non-zero only if password is surely incorrect. (main): Call ChangePW() with additional parameter.
* * passwd.c (main): Initialize oldpwd before beeing used.Corinna Vinschen2000-07-311-0/+1
|
* import winsup-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+352