summaryrefslogtreecommitdiff
path: root/platform.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-03-12 11:31:05 +1100
committerDarren Tucker <dtucker@zip.com.au>2013-03-12 11:31:05 +1100
commitaa97d13fa22d410ad155d23b230fd3cce989ce25 (patch)
tree6b5b35af5bcab94a5e6447f733a96e698069ce48 /platform.c
parentfe10a28e088751ec3a6ac96e73be21bae8b86d70 (diff)
downloadopenssh-git-aa97d13fa22d410ad155d23b230fd3cce989ce25.tar.gz
- (dtucker) [auth.c configure.ac platform.c platform.h] Accept uid 2 ("bin")
in addition to root as an owner of system directories on AIX and HP-UX. ok djm@
Diffstat (limited to 'platform.c')
-rw-r--r--platform.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/platform.c b/platform.c
index a455472b..3262b247 100644
--- a/platform.c
+++ b/platform.c
@@ -1,4 +1,4 @@
-/* $Id: platform.c,v 1.18 2011/01/11 06:02:25 djm Exp $ */
+/* $Id: platform.c,v 1.19 2013/03/12 00:31:05 dtucker Exp $ */
/*
* Copyright (c) 2006 Darren Tucker. All rights reserved.
@@ -194,3 +194,19 @@ platform_krb5_get_principal_name(const char *pw_name)
return NULL;
#endif
}
+
+/*
+ * return 1 if the specified uid is a uid that may own a system directory
+ * otherwise 0.
+ */
+int
+platform_sys_dir_uid(uid_t uid)
+{
+ if (uid == 0)
+ return 1;
+#ifdef PLATFORM_SYS_DIR_UID
+ if (uid == PLATFORM_SYS_DIR_UID)
+ return 1;
+#endif
+ return 0;
+}