X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ldap.c;h=8ee0ba73d9c66d7faeea47eec024788210cdd685;hb=17fe41bae8a65fb88683c9795414556ed9b636e9;hp=9097310cbf9354c96596a085ac46eba7c733fea8;hpb=b64adced4584be4ad4daf348acb528f3ea5b88c2;p=debian%2Fsudo diff --git a/ldap.c b/ldap.c index 9097310..8ee0ba7 100644 --- a/ldap.c +++ b/ldap.c @@ -71,7 +71,7 @@ #include "parse.h" #ifndef lint -__unused static const char rcsid[] = "$Sudo: ldap.c,v 1.11.2.36 2008/01/21 16:08:26 millert Exp $"; +__unused static const char rcsid[] = "$Sudo: ldap.c,v 1.11.2.38 2008/04/11 14:03:51 millert Exp $"; #endif /* lint */ #ifndef LINE_MAX @@ -82,6 +82,10 @@ __unused static const char rcsid[] = "$Sudo: ldap.c,v 1.11.2.36 2008/01/21 16:08 # define LDAP_OPT_SUCCESS LDAP_SUCCESS #endif +#ifndef LDAPS_PORT +# define LDAPS_PORT 636 +#endif + #define DPRINTF(args, level) if (ldap_conf.debug >= level) warnx args #define CONF_BOOL 0 @@ -1189,6 +1193,13 @@ sudo_ldap_check(pwflag) if (setenv_implied) def_setenv = TRUE; sudo_ldap_parse_options(ld, entry); +#ifdef HAVE_SELINUX + /* Set role and type if not specified on command line. */ + if (user_role == NULL) + user_role = def_role; + if (user_type == NULL) + user_type = def_type; +#endif /* HAVE_SELINUX */ /* make sure we don't reenter loop */ ret = VALIDATE_OK; /* break from inside for loop */