summaryrefslogtreecommitdiff
path: root/source3/lib/domain_namemap.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-07-14 19:21:44 +0000
committerLuke Leighton <lkcl@samba.org>1999-07-14 19:21:44 +0000
commit1f33d5a8aaa6b9a94dde21529fe2aa407fb5ffa1 (patch)
tree9dabf92f0bc5923d3d4f48c7a2eb4fcd1322f4a5 /source3/lib/domain_namemap.c
parentc553c01c86bca04583277f65d45d0e097fa38603 (diff)
downloadsamba-1f33d5a8aaa6b9a94dde21529fe2aa407fb5ffa1.tar.gz
samba-1f33d5a8aaa6b9a94dde21529fe2aa407fb5ffa1.tar.bz2
samba-1f33d5a8aaa6b9a94dde21529fe2aa407fb5ffa1.zip
code from bertl to allow remap of default built-in names to anything.
parameter is "builtin rid file". Copyright 1999 Bertl <bp@vpnet.at> (This used to be commit 80d36778432d42eb265ed9428f27a27250ba5e08)
Diffstat (limited to 'source3/lib/domain_namemap.c')
-rw-r--r--source3/lib/domain_namemap.c22
1 files changed, 1 insertions, 21 deletions
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;
}