Code

Move sdb_get_homedir() from tools/sysdb to utils/os.
[sysdb.git] / src / include / utils / os.h
index 8ffca4bcd70a5b6ea117ba748cd3b75cb2cf6c47..f4decde0f4b6312692c238d7d8cff2dc87165d36 100644 (file)
 extern "C" {
 #endif
 
+/*
+ * sdb_get_homedir:
+ * Returns the home directory of the current user. The buffer to hold the
+ * return value is allocated dynamically and has to be freed by the caller.
+ *
+ * Returns:
+ *  - the current user's home directory on success
+ *  - NULL else
+ */
+char *
+sdb_get_homedir(void);
+
 /*
  * sysdb_mkdir_all:
  * Recursively create the directory 'pathname' (similar to 'mkdir -p' on the