mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-17 23:54:35 +00:00
Constify aix_krb5_get_principal_name.
Prevents warning about discarding type qualifiers on AIX.
This commit is contained in:
parent
290c994336
commit
31c9348c5e
@ -383,12 +383,13 @@ aix_restoreauthdb(void)
|
||||
|
||||
# ifdef USE_AIX_KRB_NAME
|
||||
/*
|
||||
* aix_krb5_get_principal_name: returns the user's kerberos client principal name if
|
||||
* configured, otherwise NULL. Caller must free returned string.
|
||||
* aix_krb5_get_principal_name: returns the user's kerberos client principal
|
||||
* name if configured, otherwise NULL. Caller must free returned string.
|
||||
*/
|
||||
char *
|
||||
aix_krb5_get_principal_name(char *pw_name)
|
||||
aix_krb5_get_principal_name(const char *const_pw_name)
|
||||
{
|
||||
char *pw_name = (char *)const_pw_name;
|
||||
char *authname = NULL, *authdomain = NULL, *principal = NULL;
|
||||
|
||||
setuserdb(S_READ);
|
||||
@ -398,7 +399,8 @@ aix_krb5_get_principal_name(char *pw_name)
|
||||
debug("AIX getuserattr S_AUTHNAME: %s", strerror(errno));
|
||||
|
||||
if (authdomain != NULL)
|
||||
xasprintf(&principal, "%s@%s", authname ? authname : pw_name, authdomain);
|
||||
xasprintf(&principal, "%s@%s", authname ? authname : pw_name,
|
||||
authdomain);
|
||||
else if (authname != NULL)
|
||||
principal = xstrdup(authname);
|
||||
enduserdb();
|
||||
|
@ -97,7 +97,7 @@ char *sys_auth_get_lastlogin_msg(const char *, uid_t);
|
||||
# define CUSTOM_FAILED_LOGIN 1
|
||||
# if defined(S_AUTHDOMAIN) && defined (S_AUTHNAME)
|
||||
# define USE_AIX_KRB_NAME
|
||||
char *aix_krb5_get_principal_name(char *);
|
||||
char *aix_krb5_get_principal_name(const char *);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user