From c287cc247d90c996894cab18e870c992e7f84f85 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 6 Mar 2006 00:24:51 +0000 Subject: r13851: More doc improvements. (This used to be commit 936d26ae64b93ef8f8b2fbc632b1c2fd60840405) --- source4/lib/util/util.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'source4/lib/util/util.c') diff --git a/source4/lib/util/util.c b/source4/lib/util/util.c index 81084878b5..ec25a9cbc7 100644 --- a/source4/lib/util/util.c +++ b/source4/lib/util/util.c @@ -93,6 +93,12 @@ _PUBLIC_ BOOL directory_exist(const char *dname) return ret; } +/** + * Try to create the specified directory if it didn't exist. + * + * @retval True if the directory already existed and has the right permissions + * or was successfully created. + */ _PUBLIC_ BOOL directory_create_or_exist(const char *dname, uid_t uid, mode_t dir_perms) { @@ -486,6 +492,11 @@ static void print_asc(int level, const uint8_t *buf,int len) DEBUGADD(level,("%c", isprint(buf[i])?buf[i]:'.')); } +/** + * Write dump of binary data to the log file. + * + * The data is only written if the log level is at least level. + */ _PUBLIC_ void dump_data(int level, const uint8_t *buf,int len) { int i=0; @@ -688,6 +699,12 @@ static char *modules_path(TALLOC_CTX* mem_ctx, const char *name) return talloc_asprintf(mem_ctx, "%s/%s", dyn_MODULESDIR, name); } +/** + * Load the initialization functions from DSO files for a specific subsystem. + * + * Will return an array of function pointers to initialization functions + */ + _PUBLIC_ init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, const char *subsystem) { char *path = modules_path(mem_ctx, subsystem); @@ -700,6 +717,12 @@ _PUBLIC_ init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, const char *sub return ret; } +/** + * Write a password to the log file. + * + * @note Only actually does something if DEBUG_PASSWORD was defined during + * compile-time. + */ _PUBLIC_ void dump_data_pw(const char *msg, const uint8_t * data, size_t len) { #ifdef DEBUG_PASSWORD -- cgit