aboutsummaryrefslogtreecommitdiffstats
path: root/shell_cmds/id/open_directory.h
diff options
context:
space:
mode:
Diffstat (limited to 'shell_cmds/id/open_directory.h')
-rw-r--r--shell_cmds/id/open_directory.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/shell_cmds/id/open_directory.h b/shell_cmds/id/open_directory.h
new file mode 100644
index 0000000..2c79775
--- /dev/null
+++ b/shell_cmds/id/open_directory.h
@@ -0,0 +1,18 @@
+#include <OpenDirectory/OpenDirectory.h>
+
+ODNodeRef CreateNode(void);
+
+ODRecordRef CopyGroupRecordWithGID(ODNodeRef, gid_t);
+
+ODRecordRef CopyUserRecordWithUID(ODNodeRef, uid_t);
+ODRecordRef CopyUserRecordWithUsername(ODNodeRef, char *);
+
+CFArrayRef CopyGroupRecordsForUser(ODNodeRef, ODRecordRef, CFIndex);
+
+CFStringRef CopyAttrFromRecord(ODRecordRef record, CFStringRef attribute);
+int GetIntAttrFromRecord(ODRecordRef record, CFStringRef attribute, int *output);
+uid_t GetUIDFromRecord(ODRecordRef);
+gid_t GetGIDFromRecord(ODRecordRef);
+
+int cfprintf(FILE *file, const char *format, ...);
+int cprintf(const char *format, ...);