summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-07-01 19:02:43 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-07-01 19:02:43 +0000
commit738d29667f9cd1ce312ec011f5e37ce584d7173d (patch)
tree7ec2f0375da2b8f5ea17f0952a7c046d0a274606 /source3/lib/util.c
parent29ac1823dfce39f2259ff1994aa6145ea6009154 (diff)
downloadsamba-738d29667f9cd1ce312ec011f5e37ce584d7173d.tar.gz
samba-738d29667f9cd1ce312ec011f5e37ce584d7173d.tar.bz2
samba-738d29667f9cd1ce312ec011f5e37ce584d7173d.zip
added "hide files" option.
lkcl (This used to be commit 6e594ce0e5a3af5e7311380d18ff0d19ba9698a7)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 9ebfdca88e..889aa0b976 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3469,9 +3469,8 @@ BOOL is_vetoed_name(char *name)
return 0;
}
-BOOL is_vetoed_path(char *name)
+static BOOL is_in_path(char *name, char *namelist)
{
- char *namelist = lp_veto_files();
char *nameptr = namelist;
char *sub;
char *name_end;
@@ -3523,6 +3522,22 @@ BOOL is_vetoed_path(char *name)
}
/****************************************************************************
+used to make files hidden, but still accessible
+****************************************************************************/
+BOOL is_hidden_path(char *path)
+{
+ return is_in_path(path, lp_hide_files());
+}
+
+/****************************************************************************
+used to make files _completely_ inaccessible
+****************************************************************************/
+BOOL is_vetoed_path(char *path)
+{
+ return is_in_path(path, lp_veto_files());
+}
+
+/****************************************************************************
routine to do file locking
****************************************************************************/
BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type)