From 1f33d5a8aaa6b9a94dde21529fe2aa407fb5ffa1 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Wed, 14 Jul 1999 19:21:44 +0000 Subject: code from bertl to allow remap of default built-in names to anything. parameter is "builtin rid file". Copyright 1999 Bertl (This used to be commit 80d36778432d42eb265ed9428f27a27250ba5e08) --- source3/lib/domain_namemap.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'source3/lib/domain_namemap.c') diff --git a/source3/lib/domain_namemap.c b/source3/lib/domain_namemap.c index 156e4e7d35..fb6ecf2acf 100644 --- a/source3/lib/domain_namemap.c +++ b/source3/lib/domain_namemap.c @@ -479,7 +479,6 @@ static ubi_slList *load_name_map(DOM_MAP_TYPE type) char *aliasname_map_file = lp_aliasname_map(); char *ntusrname_map_file = lp_ntusrname_map(); - SMB_STRUCT_STAT st; FILE *fp; char *s; pstring buf; @@ -533,32 +532,13 @@ static ubi_slList *load_name_map(DOM_MAP_TYPE type) return map_list; } - if (sys_stat(map_file, &st) != 0) - { - DEBUG(0, ("load_name_map: Unable to stat file %s. Error was %s\n", - map_file, strerror(errno) )); - return map_list; - } - - /* - * Check if file has changed. - */ - if (st.st_mtime <= (*file_last_modified)) - { - return map_list; - } - - (*file_last_modified) = st.st_mtime; - /* * Load the file. */ - fp = fopen(map_file,"r"); + fp = open_file_if_modified(map_file, "r", file_last_modified); if (!fp) { - DEBUG(0,("load_name_map: can't open name map %s. Error was %s\n", - map_file, strerror(errno))); return map_list; } -- cgit