summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2014-09-16 08:40:26 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-09-16 08:40:26 (GMT)
commit44ee01dd4d2f2101f4c2315e00881a8ef35eda42 (patch) (side-by-side diff)
tree85714003008fff6c08e53491f375f2d8909a3038
parenta7927772940897e89f806f8bd4bce7967c03076a (diff)
downloadpam-modules-44ee01dd4d2f2101f4c2315e00881a8ef35eda42.tar.gz
pam-modules-44ee01dd4d2f2101f4c2315e00881a8ef35eda42.tar.bz2
pam_ldaphome: Make user-specific key boundary configurable.
* pam_ldaphome/pam_ldaphome.c (store_pubkeys): Use the value of the user-keys-boundary option as the boundary of user-specific key section.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--pam_ldaphome/pam_ldaphome.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pam_ldaphome/pam_ldaphome.c b/pam_ldaphome/pam_ldaphome.c
index 8429b97..6149a7c 100644
--- a/pam_ldaphome/pam_ldaphome.c
+++ b/pam_ldaphome/pam_ldaphome.c
@@ -1483,12 +1483,14 @@ store_pubkeys(char **keys, struct passwd *pw, struct gray_env *env)
file_name, strerror(errno));
if (!update) {
+ char *boundary = gray_env_get(env, "user-keys-boundary");
+
j = 0;
for (i = 0; i < pkf.lnc; i++) {
char *kp;
char *p = pkf.lnv[i];
if (*p == '#') {
- if (strcmp(p + 1, ":end") == 0)
+ if (boundary && strcmp(p + 1, boundary) == 0)
break;
continue;
}

Return to:

Send suggestions and report system problems to the System administrator.