summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/ipc.c58
-rw-r--r--source3/smbd/message.c8
-rw-r--r--source3/smbd/password.c4
-rw-r--r--source3/smbd/predict.c2
-rw-r--r--source3/smbd/reply.c83
-rw-r--r--source3/smbd/server.c16
6 files changed, 84 insertions, 87 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 62951219bf..e4ddcbec69 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -3447,37 +3447,37 @@ struct
{
char *name;
int id;
- BOOL (*fn)();
+ BOOL (*fn)(int,uint16,char *,char *,int,int,char **,char **,int *,int *);
int flags;
} api_commands[] = {
- {"RNetShareEnum", 0, (BOOL (*)())api_RNetShareEnum,0},
- {"RNetShareGetInfo", 1, (BOOL (*)())api_RNetShareGetInfo,0},
- {"RNetServerGetInfo", 13, (BOOL (*)())api_RNetServerGetInfo,0},
- {"RNetGroupGetUsers", 52, (BOOL (*)())api_RNetGroupGetUsers,0},
- {"RNetUserGetInfo", 56, (BOOL (*)())api_RNetUserGetInfo,0},
- {"NetUserGetGroups", 59, (BOOL (*)())api_NetUserGetGroups,0},
- {"NetWkstaGetInfo", 63, (BOOL (*)())api_NetWkstaGetInfo,0},
- {"DosPrintQEnum", 69, (BOOL (*)())api_DosPrintQEnum,0},
- {"DosPrintQGetInfo", 70, (BOOL (*)())api_DosPrintQGetInfo,0},
- {"WPrintJobEnumerate",76, (BOOL (*)())api_WPrintJobEnumerate,0},
- {"WPrintJobGetInfo", 77, (BOOL (*)())api_WPrintJobGetInfo,0},
- {"RDosPrintJobDel", 81, (BOOL (*)())api_RDosPrintJobDel,0},
- {"RDosPrintJobPause", 82, (BOOL (*)())api_RDosPrintJobDel,0},
- {"RDosPrintJobResume",83, (BOOL (*)())api_RDosPrintJobDel,0},
- {"WPrintDestEnum", 84, (BOOL (*)())api_WPrintDestEnum,0},
- {"WPrintDestGetInfo", 85, (BOOL (*)())api_WPrintDestGetInfo,0},
- {"NetRemoteTOD", 91, (BOOL (*)())api_NetRemoteTOD,0},
- {"WPrintQueuePurge", 103, (BOOL (*)())api_WPrintQueuePurge,0},
- {"NetServerEnum", 104, (BOOL (*)())api_RNetServerEnum,0},
- {"WAccessGetUserPerms",105, (BOOL (*)())api_WAccessGetUserPerms,0},
- {"SetUserPassword", 115, (BOOL (*)())api_SetUserPassword,0},
- {"WWkstaUserLogon", 132, (BOOL (*)())api_WWkstaUserLogon,0},
- {"PrintJobInfo", 147, (BOOL (*)())api_PrintJobInfo,0},
- {"WPrintDriverEnum", 205, (BOOL (*)())api_WPrintDriverEnum,0},
- {"WPrintQProcEnum", 206, (BOOL (*)())api_WPrintQProcEnum,0},
- {"WPrintPortEnum", 207, (BOOL (*)())api_WPrintPortEnum,0},
- {"SamOEMChangePassword", 214, (BOOL (*)())api_SamOEMChangePassword,0},
- {NULL, -1, (BOOL (*)())api_Unsupported,0}};
+ {"RNetShareEnum", 0, api_RNetShareEnum,0},
+ {"RNetShareGetInfo", 1, api_RNetShareGetInfo,0},
+ {"RNetServerGetInfo", 13, api_RNetServerGetInfo,0},
+ {"RNetGroupGetUsers", 52, api_RNetGroupGetUsers,0},
+ {"RNetUserGetInfo", 56, api_RNetUserGetInfo,0},
+ {"NetUserGetGroups", 59, api_NetUserGetGroups,0},
+ {"NetWkstaGetInfo", 63, api_NetWkstaGetInfo,0},
+ {"DosPrintQEnum", 69, api_DosPrintQEnum,0},
+ {"DosPrintQGetInfo", 70, api_DosPrintQGetInfo,0},
+ {"WPrintJobEnumerate",76, api_WPrintJobEnumerate,0},
+ {"WPrintJobGetInfo", 77, api_WPrintJobGetInfo,0},
+ {"RDosPrintJobDel", 81, api_RDosPrintJobDel,0},
+ {"RDosPrintJobPause", 82, api_RDosPrintJobDel,0},
+ {"RDosPrintJobResume",83, api_RDosPrintJobDel,0},
+ {"WPrintDestEnum", 84, api_WPrintDestEnum,0},
+ {"WPrintDestGetInfo", 85, api_WPrintDestGetInfo,0},
+ {"NetRemoteTOD", 91, api_NetRemoteTOD,0},
+ {"WPrintQueuePurge", 103, api_WPrintQueuePurge,0},
+ {"NetServerEnum", 104, api_RNetServerEnum,0},
+ {"WAccessGetUserPerms",105, api_WAccessGetUserPerms,0},
+ {"SetUserPassword", 115, api_SetUserPassword,0},
+ {"WWkstaUserLogon", 132, api_WWkstaUserLogon,0},
+ {"PrintJobInfo", 147, api_PrintJobInfo,0},
+ {"WPrintDriverEnum", 205, api_WPrintDriverEnum,0},
+ {"WPrintQProcEnum", 206, api_WPrintQProcEnum,0},
+ {"WPrintPortEnum", 207, api_WPrintPortEnum,0},
+ {"SamOEMChangePassword", 214, api_SamOEMChangePassword,0},
+ {NULL, -1, api_Unsupported,0}};
/****************************************************************************
diff --git a/source3/smbd/message.c b/source3/smbd/message.c
index 8c3f6f6630..24477f31ff 100644
--- a/source3/smbd/message.c
+++ b/source3/smbd/message.c
@@ -90,7 +90,7 @@ static void msg_deliver(void)
/****************************************************************************
reply to a sends
****************************************************************************/
-int reply_sends(char *inbuf,char *outbuf)
+int reply_sends(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int len;
char *orig,*dest,*msg;
@@ -128,7 +128,7 @@ int reply_sends(char *inbuf,char *outbuf)
/****************************************************************************
reply to a sendstrt
****************************************************************************/
-int reply_sendstrt(char *inbuf,char *outbuf)
+int reply_sendstrt(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
char *orig,*dest;
int outsize = 0;
@@ -155,7 +155,7 @@ int reply_sendstrt(char *inbuf,char *outbuf)
/****************************************************************************
reply to a sendtxt
****************************************************************************/
-int reply_sendtxt(char *inbuf,char *outbuf)
+int reply_sendtxt(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int len;
int outsize = 0;
@@ -183,7 +183,7 @@ int reply_sendtxt(char *inbuf,char *outbuf)
/****************************************************************************
reply to a sendend
****************************************************************************/
-int reply_sendend(char *inbuf,char *outbuf)
+int reply_sendend(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int outsize = 0;
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index be032c5c38..74ebeb1617 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -819,7 +819,7 @@ try all combinations with N uppercase letters.
offset is the first char to try and change (start with 0)
it assumes the string starts lowercased
****************************************************************************/
-static BOOL string_combinations2(char *s,int offset,BOOL (*fn)(),int N)
+static BOOL string_combinations2(char *s,int offset,BOOL (*fn)(char *),int N)
{
int len = strlen(s);
int i;
@@ -850,7 +850,7 @@ try all combinations with up to N uppercase letters.
offset is the first char to try and change (start with 0)
it assumes the string starts lowercased
****************************************************************************/
-static BOOL string_combinations(char *s,BOOL (*fn)(),int N)
+static BOOL string_combinations(char *s,BOOL (*fn)(char *),int N)
{
int n;
for (n=1;n<=N;n++)
diff --git a/source3/smbd/predict.c b/source3/smbd/predict.c
index 862ba97f7e..6f6a4ca655 100644
--- a/source3/smbd/predict.c
+++ b/source3/smbd/predict.c
@@ -95,7 +95,7 @@ int read_predict(int fd,int offset,char *buf,char **ptr,int num)
/****************************************************************************
pre-read some data
****************************************************************************/
-void do_read_prediction()
+void do_read_prediction(void)
{
static int readsize = 0;
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 8afda69b32..d4ee8223ad 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -217,7 +217,7 @@ static void parse_connect(char *p,char *service,char *user,
/****************************************************************************
reply to a tcon
****************************************************************************/
-int reply_tcon(char *inbuf,char *outbuf)
+int reply_tcon(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring service;
pstring user;
@@ -358,7 +358,7 @@ int reply_unknown(char *inbuf,char *outbuf)
/****************************************************************************
reply to an ioctl
****************************************************************************/
-int reply_ioctl(char *inbuf,char *outbuf)
+int reply_ioctl(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
DEBUG(3,("ignoring ioctl\n"));
#if 0
@@ -703,7 +703,7 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
/****************************************************************************
reply to a chkpth
****************************************************************************/
-int reply_chkpth(char *inbuf,char *outbuf)
+int reply_chkpth(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int outsize = 0;
int cnum,mode;
@@ -758,7 +758,7 @@ int reply_chkpth(char *inbuf,char *outbuf)
/****************************************************************************
reply to a getatr
****************************************************************************/
-int reply_getatr(char *inbuf,char *outbuf)
+int reply_getatr(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring fname;
int cnum;
@@ -838,7 +838,7 @@ int reply_getatr(char *inbuf,char *outbuf)
/****************************************************************************
reply to a setatr
****************************************************************************/
-int reply_setatr(char *inbuf,char *outbuf)
+int reply_setatr(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring fname;
int cnum;
@@ -885,7 +885,7 @@ int reply_setatr(char *inbuf,char *outbuf)
/****************************************************************************
reply to a dskattr
****************************************************************************/
-int reply_dskattr(char *inbuf,char *outbuf)
+int reply_dskattr(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum;
int outsize = 0;
@@ -912,7 +912,7 @@ int reply_dskattr(char *inbuf,char *outbuf)
reply to a search
Can be called from SMBsearch, SMBffirst or SMBfunique.
****************************************************************************/
-int reply_search(char *inbuf,char *outbuf)
+int reply_search(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring mask;
pstring directory;
@@ -1158,7 +1158,7 @@ int reply_search(char *inbuf,char *outbuf)
/****************************************************************************
reply to a fclose (stop directory search)
****************************************************************************/
-int reply_fclose(char *inbuf,char *outbuf)
+int reply_fclose(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum;
int outsize = 0;
@@ -1195,7 +1195,7 @@ int reply_fclose(char *inbuf,char *outbuf)
/****************************************************************************
reply to an open
****************************************************************************/
-int reply_open(char *inbuf,char *outbuf)
+int reply_open(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring fname;
int cnum;
@@ -1448,7 +1448,7 @@ int reply_ulogoffX(char *inbuf,char *outbuf,int length,int bufsize)
/****************************************************************************
reply to a mknew or a create
****************************************************************************/
-int reply_mknew(char *inbuf,char *outbuf)
+int reply_mknew(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring fname;
int cnum,com;
@@ -1538,7 +1538,7 @@ int reply_mknew(char *inbuf,char *outbuf)
/****************************************************************************
reply to a create temporary file
****************************************************************************/
-int reply_ctemp(char *inbuf,char *outbuf)
+int reply_ctemp(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring fname;
pstring fname2;
@@ -1638,7 +1638,7 @@ static BOOL can_delete(char *fname,int cnum,int dirtype)
/****************************************************************************
reply to a unlink
****************************************************************************/
-int reply_unlink(char *inbuf,char *outbuf)
+int reply_unlink(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int outsize = 0;
pstring name;
@@ -1743,7 +1743,7 @@ int reply_unlink(char *inbuf,char *outbuf)
/****************************************************************************
reply to a readbraw (core+ protocol)
****************************************************************************/
-int reply_readbraw(char *inbuf, char *outbuf)
+int reply_readbraw(char *inbuf, char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,maxcount,mincount,fnum;
int nread = 0;
@@ -1853,7 +1853,7 @@ int reply_readbraw(char *inbuf, char *outbuf)
/****************************************************************************
reply to a lockread (core+ protocol)
****************************************************************************/
-int reply_lockread(char *inbuf,char *outbuf)
+int reply_lockread(char *inbuf,char *outbuf, int dum_size, int dum_buffsiz)
{
int cnum,fnum;
int nread = -1;
@@ -1899,7 +1899,7 @@ int reply_lockread(char *inbuf,char *outbuf)
/****************************************************************************
reply to a read
****************************************************************************/
-int reply_read(char *inbuf,char *outbuf)
+int reply_read(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,numtoread,fnum;
int nread = 0;
@@ -1994,7 +1994,7 @@ int reply_read_and_X(char *inbuf,char *outbuf,int length,int bufsize)
/****************************************************************************
reply to a writebraw (core+ or LANMAN1.0 protocol)
****************************************************************************/
-int reply_writebraw(char *inbuf,char *outbuf)
+int reply_writebraw(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int nwritten=0;
int total_written=0;
@@ -2101,7 +2101,7 @@ int reply_writebraw(char *inbuf,char *outbuf)
/****************************************************************************
reply to a writeunlock (core+)
****************************************************************************/
-int reply_writeunlock(char *inbuf,char *outbuf)
+int reply_writeunlock(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,fnum;
int nwritten = -1;
@@ -2158,7 +2158,7 @@ int reply_writeunlock(char *inbuf,char *outbuf)
/****************************************************************************
reply to a write
****************************************************************************/
-int reply_write(char *inbuf,char *outbuf,int dum1,int dum2)
+int reply_write(char *inbuf,char *outbuf,int dum_size,int dum_buffsize)
{
int cnum,numtowrite,fnum;
int nwritten = -1;
@@ -2166,9 +2166,6 @@ int reply_write(char *inbuf,char *outbuf,int dum1,int dum2)
int startpos;
char *data;
- dum1 = dum2 = 0;
-
-
cnum = SVAL(inbuf,smb_tid);
fnum = GETFNUM(inbuf,smb_vwv0);
@@ -2276,7 +2273,7 @@ int reply_write_and_X(char *inbuf,char *outbuf,int length,int bufsize)
/****************************************************************************
reply to a lseek
****************************************************************************/
-int reply_lseek(char *inbuf,char *outbuf)
+int reply_lseek(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,fnum;
uint32 startpos;
@@ -2317,7 +2314,7 @@ int reply_lseek(char *inbuf,char *outbuf)
/****************************************************************************
reply to a flush
****************************************************************************/
-int reply_flush(char *inbuf,char *outbuf)
+int reply_flush(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum, fnum;
int outsize = set_message(outbuf,0,0,True);
@@ -2348,7 +2345,7 @@ int reply_flush(char *inbuf,char *outbuf)
/****************************************************************************
reply to a exit
****************************************************************************/
-int reply_exit(char *inbuf,char *outbuf)
+int reply_exit(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int outsize = set_message(outbuf,0,0,True);
DEBUG(3,("%s exit\n",timestring()));
@@ -2360,7 +2357,7 @@ int reply_exit(char *inbuf,char *outbuf)
/****************************************************************************
reply to a close
****************************************************************************/
-int reply_close(char *inbuf,char *outbuf)
+int reply_close(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int fnum,cnum;
int outsize = 0;
@@ -2406,7 +2403,7 @@ int reply_close(char *inbuf,char *outbuf)
/****************************************************************************
reply to a writeclose (Core+ protocol)
****************************************************************************/
-int reply_writeclose(char *inbuf,char *outbuf)
+int reply_writeclose(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,numtowrite,fnum;
int nwritten = -1;
@@ -2455,7 +2452,7 @@ int reply_writeclose(char *inbuf,char *outbuf)
/****************************************************************************
reply to a lock
****************************************************************************/
-int reply_lock(char *inbuf,char *outbuf)
+int reply_lock(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int fnum,cnum;
int outsize = set_message(outbuf,0,0,True);
@@ -2484,7 +2481,7 @@ int reply_lock(char *inbuf,char *outbuf)
/****************************************************************************
reply to a unlock
****************************************************************************/
-int reply_unlock(char *inbuf,char *outbuf)
+int reply_unlock(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int fnum,cnum;
int outsize = set_message(outbuf,0,0,True);
@@ -2513,7 +2510,7 @@ int reply_unlock(char *inbuf,char *outbuf)
/****************************************************************************
reply to a tdis
****************************************************************************/
-int reply_tdis(char *inbuf,char *outbuf)
+int reply_tdis(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum;
int outsize = set_message(outbuf,0,0,True);
@@ -2541,7 +2538,7 @@ int reply_tdis(char *inbuf,char *outbuf)
/****************************************************************************
reply to a echo
****************************************************************************/
-int reply_echo(char *inbuf,char *outbuf)
+int reply_echo(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum;
int smb_reverb = SVAL(inbuf,smb_vwv0);
@@ -2591,7 +2588,7 @@ int reply_echo(char *inbuf,char *outbuf)
/****************************************************************************
reply to a printopen
****************************************************************************/
-int reply_printopen(char *inbuf,char *outbuf)
+int reply_printopen(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring fname;
pstring fname2;
@@ -2658,7 +2655,7 @@ int reply_printopen(char *inbuf,char *outbuf)
/****************************************************************************
reply to a printclose
****************************************************************************/
-int reply_printclose(char *inbuf,char *outbuf)
+int reply_printclose(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int fnum,cnum;
int outsize = set_message(outbuf,0,0,True);
@@ -2683,7 +2680,7 @@ int reply_printclose(char *inbuf,char *outbuf)
/****************************************************************************
reply to a printqueue
****************************************************************************/
-int reply_printqueue(char *inbuf,char *outbuf)
+int reply_printqueue(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum;
int outsize = set_message(outbuf,2,3,True);
@@ -2777,7 +2774,7 @@ int reply_printqueue(char *inbuf,char *outbuf)
/****************************************************************************
reply to a printwrite
****************************************************************************/
-int reply_printwrite(char *inbuf,char *outbuf)
+int reply_printwrite(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,numtowrite,fnum;
int outsize = set_message(outbuf,0,0,True);
@@ -2809,7 +2806,7 @@ int reply_printwrite(char *inbuf,char *outbuf)
/****************************************************************************
reply to a mkdir
****************************************************************************/
-int reply_mkdir(char *inbuf,char *outbuf)
+int reply_mkdir(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring directory;
int cnum;
@@ -2904,7 +2901,7 @@ static BOOL recursive_rmdir(char *directory)
/****************************************************************************
reply to a rmdir
****************************************************************************/
-int reply_rmdir(char *inbuf,char *outbuf)
+int reply_rmdir(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
pstring directory;
int cnum;
@@ -3096,7 +3093,7 @@ static BOOL can_rename(char *fname,int cnum)
/****************************************************************************
reply to a mv
****************************************************************************/
-int reply_mv(char *inbuf,char *outbuf)
+int reply_mv(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int outsize = 0;
pstring name;
@@ -3351,7 +3348,7 @@ static BOOL copy_file(char *src,char *dest1,int cnum,int ofun,
/****************************************************************************
reply to a file copy.
****************************************************************************/
-int reply_copy(char *inbuf,char *outbuf)
+int reply_copy(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int outsize = 0;
pstring name;
@@ -3485,7 +3482,7 @@ int reply_copy(char *inbuf,char *outbuf)
/****************************************************************************
reply to a setdir
****************************************************************************/
-int reply_setdir(char *inbuf,char *outbuf)
+int reply_setdir(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,snum;
int outsize = 0;
@@ -3714,7 +3711,7 @@ int reply_readbmpx(char *inbuf,char *outbuf,int length,int bufsize)
/****************************************************************************
reply to a SMBwritebmpx (write block multiplex primary) request
****************************************************************************/
-int reply_writebmpx(char *inbuf,char *outbuf)
+int reply_writebmpx(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,numtowrite,fnum;
int nwritten = -1;
@@ -3807,7 +3804,7 @@ int reply_writebmpx(char *inbuf,char *outbuf)
/****************************************************************************
reply to a SMBwritebs (write block multiplex secondary) request
****************************************************************************/
-int reply_writebs(char *inbuf,char *outbuf)
+int reply_writebs(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,numtowrite,fnum;
int nwritten = -1;
@@ -3888,7 +3885,7 @@ int reply_writebs(char *inbuf,char *outbuf)
/****************************************************************************
reply to a SMBsetattrE
****************************************************************************/
-int reply_setattrE(char *inbuf,char *outbuf)
+int reply_setattrE(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,fnum;
struct utimbuf unix_times;
@@ -3941,7 +3938,7 @@ not setting timestamps of 0\n",
/****************************************************************************
reply to a SMBgetattrE
****************************************************************************/
-int reply_getattrE(char *inbuf,char *outbuf)
+int reply_getattrE(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int cnum,fnum;
struct stat sbuf;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index e0652d35c8..7216ae79bb 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1060,7 +1060,7 @@ static file_fd_struct *fd_get_already_open(struct stat *sbuf)
fd support routines - attempt to find a empty slot in the FileFd array.
Increments the ref_count of the returned entry.
****************************************************************************/
-static file_fd_struct *fd_get_new()
+static file_fd_struct *fd_get_new(void)
{
int i;
file_fd_struct *fd_ptr;
@@ -2380,7 +2380,7 @@ int error_packet(char *inbuf,char *outbuf,int error_class,uint32 error_code,int
/****************************************************************************
this prevents zombie child processes
****************************************************************************/
-static int sig_cld()
+static int sig_cld(void)
{
static int depth = 0;
if (depth != 0)
@@ -2425,7 +2425,7 @@ static int sig_cld()
/****************************************************************************
this is called when the client exits abruptly
**************************************************************************/
-static int sig_pipe()
+static int sig_pipe(void)
{
struct cli_state *cli;
BlockSignals(True,SIGPIPE);
@@ -2698,7 +2698,7 @@ static void process_smb(char *inbuf, char *outbuf)
/****************************************************************************
open the oplock IPC socket communication
****************************************************************************/
-static BOOL open_oplock_ipc()
+static BOOL open_oplock_ipc(void)
{
struct sockaddr_in sock_name;
int len = sizeof(sock_name);
@@ -3318,7 +3318,7 @@ BOOL reload_services(BOOL test)
/****************************************************************************
this prevents zombie child processes
****************************************************************************/
-static int sig_hup()
+static int sig_hup(void)
{
BlockSignals(True,SIGHUP);
DEBUG(0,("Got SIGHUP\n"));
@@ -4066,7 +4066,7 @@ struct {
/****************************************************************************
reply to a negprot
****************************************************************************/
-static int reply_negprot(char *inbuf,char *outbuf)
+static int reply_negprot(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
int outsize = set_message(outbuf,1,0,True);
int Index=0;
@@ -4392,7 +4392,7 @@ struct smb_message_struct
{
int code;
char *name;
- int (*fn)();
+ int (*fn)(char *, char *, int, int);
int flags;
#if PROFILING
unsigned long time;
@@ -5042,7 +5042,7 @@ static void usage(char *pname)
seteuid(0);
#endif
- fault_setup(exit_server);
+ fault_setup((void (*)(void *))exit_server);
signal(SIGTERM , SIGNAL_CAST dflt_sig);
/* we want total control over the permissions on created files,