aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-03-24 11:19:36 +0100
committerAndreas Schneider <asn@samba.org>2020-03-24 11:20:03 +0100
commitc7ab357a0c24d48ddd521c282af4eeec016b2eb4 (patch)
tree90f402726b5aa6a742e23473c2d747478e6c615b
parent1f224299e46a44473c42eab06a8fcc369fb3c8f2 (diff)
downloadpam_wrapper-c7ab357a0c24d48ddd521c282af4eeec016b2eb4.tar.gz
pam_wrapper-c7ab357a0c24d48ddd521c282af4eeec016b2eb4.tar.xz
pam_wrapper-c7ab357a0c24d48ddd521c282af4eeec016b2eb4.zip
pwrap: Use PSO_COPY_READ_SIZE in pso_copy()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r--src/pam_wrapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pam_wrapper.c b/src/pam_wrapper.c
index 357e09c..fda7ff2 100644
--- a/src/pam_wrapper.c
+++ b/src/pam_wrapper.c
@@ -994,9 +994,9 @@ static int pso_copy(const char *src, const char *dst, const char *pdir, mode_t m
}
if (found_slash && bread == PSO_COPY_READ_SIZE) {
- cmp = memcmp(buf, "etc/pam.d", 9);
+ cmp = memcmp(buf, "etc/pam.d", PSO_COPY_READ_SIZE);
if (cmp == 0) {
- memcpy(buf, pdir + 1, 9);
+ memcpy(buf, pdir + 1, PSO_COPY_READ_SIZE);
}
found_slash = false;
}