From 6fef1e4eb53877d41f52f2b4d93ea11eb680b6b3 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 16 Oct 2016 23:14:06 -0700 Subject: Use const pointers in function arguments when possible --- sesman/verify_user_bsd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sesman/verify_user_bsd.c') diff --git a/sesman/verify_user_bsd.c b/sesman/verify_user_bsd.c index 5d9d0e23..1d84c242 100644 --- a/sesman/verify_user_bsd.c +++ b/sesman/verify_user_bsd.c @@ -44,7 +44,7 @@ extern struct config_sesman* g_cfg; /* in sesman.c */ /******************************************************************************/ /* returns boolean */ long DEFAULT_CC -auth_userpass(char *user, char *pass, int *errorcode) +auth_userpass(const char *user, const char *pass, int *errorcode) { int ret = auth_userokay(user, NULL, "auth-xrdp", pass); return ret; @@ -74,13 +74,13 @@ auth_set_env(long in_val) /******************************************************************************/ int DEFAULT_CC -auth_check_pwd_chg(char* user) +auth_check_pwd_chg(const char *user) { return 0; } int DEFAULT_CC -auth_change_pwd(char* user, char* newpwd) +auth_change_pwd(const char *user, const char *newpwd) { return 0; } -- cgit v1.2.1 From e9a0324cb3b5f10b94fdd9fdf260fadc075d7e82 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 6 Nov 2016 20:01:49 -0800 Subject: Fix compile warnings for non-default authentication methods Include string.h for strcmp(). Don't define _XOPEN_SOURCE, it conflicts with libc headers and hides putpwent(). Make input strings constant. Fix functions to match their declarations. --- sesman/verify_user_bsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sesman/verify_user_bsd.c') diff --git a/sesman/verify_user_bsd.c b/sesman/verify_user_bsd.c index 1d84c242..ff5e87a9 100644 --- a/sesman/verify_user_bsd.c +++ b/sesman/verify_user_bsd.c @@ -101,7 +101,7 @@ auth_stop_session(long in_val) */ static int DEFAULT_CC -auth_crypt_pwd(char* pwd, char* pln, char* crp) +auth_crypt_pwd(const char *pwd, const char *pln, char *crp) { return 0; } -- cgit v1.2.1