Repository: ranger
Updated Branches:
  refs/heads/ranger-1.1 c06ab7a50 -> 97abb450d


RANGER-2172: Fixing minor issue with the no. of characters read using sscanf - 
ranger-1.1 branch


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/97abb450
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/97abb450
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/97abb450

Branch: refs/heads/ranger-1.1
Commit: 97abb450d4cf772d7dfc51417d240d46a64693ac
Parents: c06ab7a
Author: Sailaja Polavarapu <[email protected]>
Authored: Thu Aug 2 13:14:04 2018 -0700
Committer: Sailaja Polavarapu <[email protected]>
Committed: Thu Aug 2 13:14:04 2018 -0700

----------------------------------------------------------------------
 unixauthnative/src/main/c/credValidator.c | 2 +-
 unixauthpam/src/main/c/pamCredValidator.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/97abb450/unixauthnative/src/main/c/credValidator.c
----------------------------------------------------------------------
diff --git a/unixauthnative/src/main/c/credValidator.c 
b/unixauthnative/src/main/c/credValidator.c
index 189c2ca..e426bdd 100644
--- a/unixauthnative/src/main/c/credValidator.c
+++ b/unixauthnative/src/main/c/credValidator.c
@@ -35,7 +35,7 @@ int main(int ac, char **av, char **ev)
        struct spwd *spwd ; 
 
        fgets(line,512,stdin) ;
-       sprintf(format, "LOGIN:%%%ds %%%ds", STRLEN, STRLEN);
+       sprintf(format, "LOGIN:%%%ds %%%ds", STRLEN-1, STRLEN-1);
        sscanf(line, format, username,password) ;
 
        pwp = getpwnam(username) ;

http://git-wip-us.apache.org/repos/asf/ranger/blob/97abb450/unixauthpam/src/main/c/pamCredValidator.c
----------------------------------------------------------------------
diff --git a/unixauthpam/src/main/c/pamCredValidator.c 
b/unixauthpam/src/main/c/pamCredValidator.c
index 8e36903..60d38ae 100644
--- a/unixauthpam/src/main/c/pamCredValidator.c
+++ b/unixauthpam/src/main/c/pamCredValidator.c
@@ -66,7 +66,7 @@ int main(int ac, char **av, char **ev)
        int retval;
        pam_handle_t *pamh = NULL;
 
-       sprintf(format, "LOGIN:%%%ds %%%ds", STRLEN, STRLEN);
+       sprintf(format, "LOGIN:%%%ds %%%ds", STRLEN-1, STRLEN-1);
        fgets(line,512,stdin) ;
        sscanf(line, format, username,password) ;
        conv.appdata_ptr = (char *) password;

Reply via email to