diff options
author | Sam Hartman <hartmans@debian.org> | 2023-09-11 14:10:02 -0600 |
---|---|---|
committer | Sam Hartman <hartmans@debian.org> | 2023-09-11 14:10:02 -0600 |
commit | 42408448b00a7a2150b5853dc4f63296b6827e0e (patch) | |
tree | f2d801e728b41563b77ebe89a3d560319ff37d31 /modules/pam_listfile/pam_listfile.c | |
parent | b99a4f53dcf4725e4b3b861fd8a28c0156a8a147 (diff) | |
parent | e9aa2ef52a423a3a33299bf7e8715eb5bd76ea67 (diff) | |
download | pam-42408448b00a7a2150b5853dc4f63296b6827e0e.tar.gz pam-42408448b00a7a2150b5853dc4f63296b6827e0e.tar.bz2 pam-42408448b00a7a2150b5853dc4f63296b6827e0e.zip |
Update upstream source from tag 'upstream/1.5.3'
Update to upstream version '1.5.3'
with Debian dir 6b9d9dfb8a4ca02d4557097ee59960e72a6a4a29
Diffstat (limited to 'modules/pam_listfile/pam_listfile.c')
-rw-r--r-- | modules/pam_listfile/pam_listfile.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/pam_listfile/pam_listfile.c b/modules/pam_listfile/pam_listfile.c index 28fd58fc..937576fd 100644 --- a/modules/pam_listfile/pam_listfile.c +++ b/modules/pam_listfile/pam_listfile.c @@ -53,17 +53,16 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, const char *citemp; char *ifname=NULL; char aline[256]; - char mybuf[256],myval[256]; + char mybuf[256],myval[256],apply_val[256]; struct stat fileinfo; FILE *inf; - const char *apply_val; int apply_type; /* Stuff for "extended" items */ struct passwd *userinfo; apply_type=APPLY_TYPE_NULL; - apply_val=""; + apply_val[0] = '\0'; for(i=0; i < argc; i++) { { @@ -133,10 +132,10 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, apply_type=APPLY_TYPE_NONE; if (myval[0]=='@') { apply_type=APPLY_TYPE_GROUP; - apply_val=myval+1; + memcpy(apply_val,myval+1,sizeof(myval)-1); } else { apply_type=APPLY_TYPE_USER; - apply_val=myval; + memcpy(apply_val,myval,sizeof(myval)); } } else { free(ifname); |