* cygserver_setpwd.h (setlsapwd): Add username parameter to declaration.

* external.cc (cygwin_internal): In the CW_SET_PRIV_KEY case, fetch
	additional username parameter.
	* setlsapwd.cc (setlsapwd): Add username parameter.  Allow admin to
	set the hidden password for other users.
This commit is contained in:
Corinna Vinschen
2011-04-04 09:04:00 +00:00
parent 225b37131a
commit 1db2e3fbfb
4 changed files with 32 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
/* external.cc: Interface to Cygwin internals from external programs.
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
Written by Christopher Faylor <cgf@cygnus.com>
@@ -435,7 +435,8 @@ cygwin_internal (cygwin_getinfo_types t, ...)
case CW_SET_PRIV_KEY:
{
const char *passwd = va_arg (arg, const char *);
res = setlsapwd (passwd);
const char *username = va_arg (arg, const char *);
res = setlsapwd (passwd, username);
}
break;
case CW_SETERRNO: