[PATCH] Fix typecast warning

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] Fix typecast warning

Prabhakar_Pujeri
Signed-off-by: prabhakar pujeri <[hidden email]>
---
 src/authenticators/file/file_auth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/authenticators/file/file_auth.c b/src/authenticators/file/file_auth.c
index a5d5bf2..d3f38f4 100644
--- a/src/authenticators/file/file_auth.c
+++ b/src/authenticators/file/file_auth.c
@@ -121,7 +121,7 @@ authorize(char *username, const char *password)
                 if (username_l < min_len) {
                   min_len = username_l;
                 }
-                if (!safe_cmp(username, u, min_len)) {
+                if (!safe_cmp((unsigned char *)username, (unsigned char *)u, min_len)) {
                         size_t newpw_l;
                         min_len = strlen(passwd);
                         newpw = crypt(password, passwd);
@@ -130,7 +130,7 @@ authorize(char *username, const char *password)
                           min_len = newpw_l;
                         }
                         debug( "user: %s,  passwd: XXXXX", u );
-                        authorized = ( safe_cmp (newpw, passwd, min_len) == 0 );
+                        authorized = ( safe_cmp ((unsigned char *)newpw, (unsigned char *)passwd, min_len) == 0 );
                     break;
                 }
        }
--
2.4.0


------------------------------------------------------------------------------
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Loading...