From 4bd40183afd6d423ccbe5f43dac83bd299f86c50 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 26 Jun 2006 11:23:06 +0000 Subject: r16516: Get rid of file_exists() as there already is a file_exist(). (This used to be commit c4b3c2b18c6df43c8a4808fab72bc45439ba9421) --- source4/auth/gensec/schannel_state.c | 2 +- source4/lib/util/util_file.c | 9 --------- source4/passdb/secrets.c | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) (limited to 'source4') diff --git a/source4/auth/gensec/schannel_state.c b/source4/auth/gensec/schannel_state.c index b9cee49f5a..97bcd40d09 100644 --- a/source4/auth/gensec/schannel_state.c +++ b/source4/auth/gensec/schannel_state.c @@ -45,7 +45,7 @@ struct ldb_context *schannel_db_connect(TALLOC_CTX *mem_ctx) return NULL; } - existed = file_exists(path); + existed = file_exist(path); ldb = ldb_wrap_connect(mem_ctx, path, system_session(mem_ctx), NULL, LDB_FLG_NOSYNC, NULL); diff --git a/source4/lib/util/util_file.c b/source4/lib/util/util_file.c index 8d8e7c6ec9..99432ad8bb 100644 --- a/source4/lib/util/util_file.c +++ b/source4/lib/util/util_file.c @@ -356,15 +356,6 @@ _PUBLIC_ BOOL file_save(const char *fname, const void *packet, size_t length) return True; } -/** - see if a file exists -*/ -_PUBLIC_ BOOL file_exists(const char *path) -{ - struct stat st; - return (stat(path, &st) == 0); -} - _PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) _PRINTF_ATTRIBUTE(2,0) { char *p; diff --git a/source4/passdb/secrets.c b/source4/passdb/secrets.c index cbf94c0c3e..8f4b5f4f5e 100644 --- a/source4/passdb/secrets.c +++ b/source4/passdb/secrets.c @@ -107,7 +107,7 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx) return NULL; } - existed = file_exists(path); + existed = file_exist(path); /* Secrets.ldb *must* always be local. If we call for a * system_session() we will recurse */ -- cgit