Code

utils/os: Added sdb_get_current_user().
[sysdb.git] / src / include / utils / os.h
index 2e6c54776ede89ba35d2f70aacda889df89b7d75..07328dd11a2b0d9aaf96c82c0f920e1d88082070 100644 (file)
@@ -57,6 +57,18 @@ sdb_mkdir_all(const char *pathname, mode_t mode);
 int
 sdb_remove_all(const char *pathname);
 
+/*
+ * sdb_get_current_user:
+ * Returns the name of the current user. The string is allocated dynamically
+ * and has to be freed by the caller.
+ *
+ * Returns:
+ *  - the username on success
+ *  - NULL else
+ */
+char *
+sdb_get_current_user(void);
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif