summaryrefslogtreecommitdiff
path: root/source3/smbd/connection.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-10-18 22:06:35 +0000
committerJeremy Allison <jra@samba.org>1998-10-18 22:06:35 +0000
commitb8aec499dc49b1d86d9f44296e07d40232813642 (patch)
tree014e4b1eaa634570a351bec6e1baad272f37fc07 /source3/smbd/connection.c
parent691e2f245c7ac01b027e7300aa7fd2b1ccc90876 (diff)
downloadsamba-b8aec499dc49b1d86d9f44296e07d40232813642.tar.gz
samba-b8aec499dc49b1d86d9f44296e07d40232813642.tar.bz2
samba-b8aec499dc49b1d86d9f44296e07d40232813642.zip
Fixed sys_lseek and seek_file calls so all returns
are *checked* :-). Jeremy. (This used to be commit b8b781191dd7d28944d87eec5fa0fbef798e289b)
Diffstat (limited to 'source3/smbd/connection.c')
-rw-r--r--source3/smbd/connection.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 0170fa5497..af74e40f6a 100644
--- a/source3/smbd/connection.c
+++ b/source3/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;