diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-02-28 21:28:59 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-02-28 21:28:59 +0800 |
commit | 9bbce01e1b9d6b42869bbba9f36d6849a42276fe (patch) | |
tree | c9b9503211280a5ff84bff15e9e482137c8a4404 /svr-auth.c | |
parent | 5df73215f887bbc4ebd122e725fe5497d92f511f (diff) | |
parent | bbe02dc3cfd5f0367a43dac6521afc65254d74a8 (diff) |
merge from main
--HG--
branch : fuzz
Diffstat (limited to 'svr-auth.c')
-rw-r--r-- | svr-auth.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -197,6 +197,7 @@ out: m_free(methodname); } +#ifdef HAVE_GETGROUPLIST /* returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ static int check_group_membership(gid_t check_gid, const char* username, gid_t user_gid) { int ngroups, i, ret; @@ -230,7 +231,7 @@ static int check_group_membership(gid_t check_gid, const char* username, gid_t u return match; } - +#endif /* Check that the username exists and isn't disallowed (root), and has a valid shell. * returns DROPBEAR_SUCCESS on valid username, DROPBEAR_FAILURE on failure */ @@ -300,6 +301,7 @@ static int checkusername(const char *username, unsigned int userlen) { } /* check for login restricted to certain group if desired */ +#ifdef HAVE_GETGROUPLIST if (svr_opts.restrict_group) { if (check_group_membership(svr_opts.restrict_group_gid, ses.authstate.pw_name, ses.authstate.pw_gid) == DROPBEAR_FAILURE) { @@ -310,6 +312,7 @@ static int checkusername(const char *username, unsigned int userlen) { return DROPBEAR_FAILURE; } } +#endif HAVE_GETGROUPLIST TRACE(("shell is %s", ses.authstate.pw_shell)) |