From: Jelmer Vernooij Date: Mon, 26 Jun 2006 11:23:06 +0000 (+0000) Subject: r16516: Get rid of file_exists() as there already is a file_exist(). X-Git-Tag: samba-misc-tags/initial-v4-0-unstable~4133 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=c4b3c2b18c6df43c8a4808fab72bc45439ba9421;hp=cebabc7588b171f575f2193f4f6ead01b524acb2 r16516: Get rid of file_exists() as there already is a file_exist(). --- diff --git a/source/auth/gensec/schannel_state.c b/source/auth/gensec/schannel_state.c index b9cee49f5af..97bcd40d091 100644 --- a/source/auth/gensec/schannel_state.c +++ b/source/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/source/lib/util/util_file.c b/source/lib/util/util_file.c index 8d8e7c6ec9c..99432ad8bbd 100644 --- a/source/lib/util/util_file.c +++ b/source/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/source/passdb/secrets.c b/source/passdb/secrets.c index cbf94c0c3e8..8f4b5f4f5ee 100644 --- a/source/passdb/secrets.c +++ b/source/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 */