forked from pool/pam_pkcs11
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
--- pam_pkcs11-0.5.3/src/mappers/ms_mapper.c~ 2005-09-12 05:12:55.000000000 -0400
|
|
+++ pam_pkcs11-0.5.3/src/mappers/ms_mapper.c 2007-01-17 14:27:52.000000000 -0500
|
|
@@ -52,6 +52,7 @@
|
|
static int ignorecase = 0;
|
|
static int ignoredomain =0;
|
|
static const char *domainname="";
|
|
+static const char *domainnickname="";
|
|
static int debug =0;
|
|
|
|
/* check syntax and domain match on provided string */
|
|
@@ -73,6 +74,16 @@
|
|
DBG2("Domain '%s' doesn't match UPN domain '%s'",domainname,domain);
|
|
return NULL;
|
|
}
|
|
+ if (domainnickname && domainnickname[0]) {
|
|
+ char *tmp;
|
|
+ size_t tmp_len;
|
|
+ DBG1("Adding domain nick name '%s'",domainnickname);
|
|
+ tmp_len = strlen (str) + strlen (domainnickname) + 2;
|
|
+ tmp = malloc (tmp_len);
|
|
+ snprintf (tmp, tmp_len, "%s\\%s", domainnickname, str);
|
|
+ free (str);
|
|
+ str = tmp;
|
|
+ }
|
|
return str;
|
|
}
|
|
|
|
@@ -179,6 +190,7 @@
|
|
ignorecase = scconf_get_bool(blk,"ignorecase",ignorecase);
|
|
ignoredomain = scconf_get_bool(blk,"ignoredomain",ignoredomain);
|
|
domainname = scconf_get_str(blk,"domainname",domainname);
|
|
+ domainnickname = scconf_get_str(blk,"domainnickname",domainnickname);
|
|
} else {
|
|
DBG1("No block declaration for mapper '%s'",mapper_name);
|
|
}
|