diff options
Diffstat (limited to 'source/passdb/smbpass.c')
-rw-r--r-- | source/passdb/smbpass.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/source/passdb/smbpass.c b/source/passdb/smbpass.c index 2dec15ffb43..cd4a7ccf664 100644 --- a/source/passdb/smbpass.c +++ b/source/passdb/smbpass.c @@ -19,7 +19,6 @@ */ #include "includes.h" -#include "loadparm.h" extern int DEBUGLEVEL; @@ -59,8 +58,7 @@ do_pw_lock(int fd, int waitsecs, int type) return ret; } -int -pw_file_lock(char *name, int type, int secs) +int pw_file_lock(char *name, int type, int secs) { int fd = open(name, O_RDWR | O_CREAT, 0666); if (fd < 0) @@ -72,8 +70,7 @@ pw_file_lock(char *name, int type, int secs) return fd; } -int -pw_file_unlock(int fd) +int pw_file_unlock(int fd) { do_pw_lock(fd, 5, F_UNLCK); return close(fd); @@ -110,8 +107,7 @@ static int gethexpwd(char *p, char *pwd) /* * Routine to search the smbpasswd file for an entry matching the username. */ -struct smb_passwd * -get_smbpwnam(char *name) +struct smb_passwd *get_smbpwnam(char *name) { /* Static buffers we will return. */ static struct smb_passwd pw_buf; @@ -262,7 +258,7 @@ get_smbpwnam(char *name) if (!strncasecmp((char *) p, "NO PASSWORD", 11)) { pw_buf.smb_passwd = NULL; } else { - if(!gethexpwd(p,smbpwd)) { + if(!gethexpwd((char *)p,(char *)smbpwd)) { DEBUG(0, ("Malformed Lanman password entry (non hex chars)\n")); fclose(fp); pw_file_unlock(lockfd); @@ -280,7 +276,7 @@ get_smbpwnam(char *name) the lanman password. */ if ((linebuf_len >= (PTR_DIFF(p, linebuf) + 33)) && (p[32] == ':')) { if (*p != '*' && *p != 'X') { - if(gethexpwd(p,smbntpwd)) + if(gethexpwd((char *)p,(char *)smbntpwd)) pw_buf.smb_nt_passwd = smbntpwd; } } @@ -297,8 +293,7 @@ get_smbpwnam(char *name) return NULL; } #else -void -smbpass_dummy(void) + void smbpass_dummy(void) { } /* To avoid compiler complaints */ #endif |