summaryrefslogtreecommitdiffstats
path: root/platform.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-11-05 02:03:05 +0100
committerDarren Tucker <dtucker@zip.com.au>2010-11-05 02:03:05 +0100
commit97528353c2b4f27169ea9b81e5c4420c734ceea2 (patch)
tree7f373a0ff2a453fc4b86c3467501c485dd510e44 /platform.c
parent - (djm) [loginrec.c loginrec.h] Use correct uid_t/pid_t types instead of (diff)
downloadopenssh-97528353c2b4f27169ea9b81e5c4420c734ceea2.tar.xz
openssh-97528353c2b4f27169ea9b81e5c4420c734ceea2.zip
- (dtucker) [configure.ac platform.{c,h} session.c
openbsd-compat/port-solaris.{c,h}] Bug #1824: Add Solaris Project support. Patch from cory.erickson at csu mnscu edu with a bit of rework from me. ok djm@
Diffstat (limited to 'platform.c')
-rw-r--r--platform.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/platform.c b/platform.c
index e3a428aaa..c894190b2 100644
--- a/platform.c
+++ b/platform.c
@@ -1,4 +1,4 @@
-/* $Id: platform.c,v 1.3 2009/12/20 23:49:22 dtucker Exp $ */
+/* $Id: platform.c,v 1.4 2010/11/05 01:03:05 dtucker Exp $ */
/*
* Copyright (c) 2006 Darren Tucker. All rights reserved.
@@ -57,6 +57,16 @@ platform_post_fork_child(void)
#endif
}
+void
+platform_setusercontext(struct passwd *pw)
+{
+#ifdef USE_SOLARIS_PROJECTS
+ /* if solaris projects were detected, set the default now */
+ if (getuid() == 0 || geteuid() == 0)
+ solaris_set_default_project(pw);
+#endif
+}
+
char *
platform_krb5_get_principal_name(const char *pw_name)
{