diff options
author | Jeremy Allison <jra@samba.org> | 1998-10-18 22:06:35 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-10-18 22:06:35 +0000 |
commit | b8b781191dd7d28944d87eec5fa0fbef798e289b (patch) | |
tree | a40b2ff81c5186985935313184f53fc38577956d /source/smbd/connection.c | |
parent | 20880966aafb2dbcdfbf979505a2d64a269dd9a8 (diff) | |
download | samba-b8b781191dd7d28944d87eec5fa0fbef798e289b.tar.gz samba-b8b781191dd7d28944d87eec5fa0fbef798e289b.tar.xz samba-b8b781191dd7d28944d87eec5fa0fbef798e289b.zip |
Fixed sys_lseek and seek_file calls so all returns
are *checked* :-).
Jeremy.
Diffstat (limited to 'source/smbd/connection.c')
-rw-r--r-- | source/smbd/connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/smbd/connection.c b/source/smbd/connection.c index 0170fa54972..af74e40f6a5 100644 --- a/source/smbd/connection.c +++ b/source/smbd/connection.c @@ -166,7 +166,11 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO } if (Clear && crec.pid && !process_exists(crec.pid)) { - sys_lseek(fd,i*sizeof(crec),SEEK_SET); + if(sys_lseek(fd,i*sizeof(crec),SEEK_SET) != i*sizeof(crec)) { + DEBUG(0,("claim_connection: ERROR: sys_lseek failed to seek \ +to %d\n", i*sizeof(crec) )); + continue; + } bzero((void *)&crec,sizeof(crec)); write(fd, &crec,sizeof(crec)); if (foundi < 0) foundi = i; |