From 738d29667f9cd1ce312ec011f5e37ce584d7173d Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Tue, 1 Jul 1997 19:02:43 +0000 Subject: added "hide files" option. lkcl (This used to be commit 6e594ce0e5a3af5e7311380d18ff0d19ba9698a7) --- source3/lib/util.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'source3/lib') 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; @@ -3522,6 +3521,22 @@ BOOL is_vetoed_path(char *name) return 0; } +/**************************************************************************** +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 ****************************************************************************/ -- cgit