summaryrefslogtreecommitdiff
path: root/source/lib/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/system.c')
-rw-r--r--source/lib/system.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/lib/system.c b/source/lib/system.c
index 938746e9c9d..81e9a6679ad 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -25,13 +25,17 @@ extern int DEBUGLEVEL;
/*
The idea is that this file will eventually have wrappers around all
- important system calls in samba. The aim is twofold:
+ important system calls in samba. The aims are:
- to enable easier porting by putting OS dependent stuff in here
- to allow for hooks into other "pseudo-filesystems"
- to allow easier integration of things like the japanese extensions
+
+ - to support the philosophy of Samba to expose the features of
+ the OS within the SMB model. In general whatever file/printer/variable
+ expansions/etc make sense to the OS should be acceptable to Samba.
*/
@@ -79,7 +83,7 @@ int sys_select(fd_set *fds,struct timeval *tval)
return(found);
}
- if (tval && tval.tv_sec < counter) return(0);
+ if (tval && tval->tv_sec < counter) return(0);
sleep(1);
counter++;
}
@@ -94,7 +98,7 @@ int sys_select(fd_set *fds,struct timeval *tval)
do {
if (tval) memcpy((void *)&t2,(void *)tval,sizeof(t2));
errno = 0;
- selrtn = select(16,SELECT_CAST fds,NULL,NULL,tval?&t2:NULL);
+ selrtn = select(255,SELECT_CAST fds,NULL,NULL,tval?&t2:NULL);
} while (selrtn<0 && errno == EINTR);
return(selrtn);
@@ -196,6 +200,13 @@ int sys_rename(char *from, char *to)
#endif /* KANJI */
}
+/*******************************************************************
+for chmod
+********************************************************************/
+int sys_chmod(char *fname,int mode)
+{
+ return(chmod(dos_to_unix(fname,False),mode));
+}
/*******************************************************************
chown isn't used much but OS/2 doesn't have it