Bugzilla – Attachment 1937 Details for
Bug 1824
Added project(4) support for Solaris 10
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
solaris project support added to SNAP-20100922
diff_u_out (text/plain), 3.04 KB, created by
Cory Erickson
on 2010-10-19 09:08:31 AEDT
(
hide
)
Description:
solaris project support added to SNAP-20100922
Filename:
MIME Type:
Creator:
Cory Erickson
Created:
2010-10-19 09:08:31 AEDT
Size:
3.04 KB
patch
obsolete
>diff -ru openssh-SNAP-20100922/configure.ac openssh-solaris-projects/configure.ac >--- openssh-SNAP-20100922/configure.ac Thu Sep 9 20:39:27 2010 >+++ openssh-solaris-projects/configure.ac Mon Oct 18 16:47:21 2010 >@@ -333,6 +333,7 @@ > # Messages for features tested for in target-specific section > SIA_MSG="no" > SPC_MSG="no" >+SP_MSG="no" > > # Check for some target-specific stuff > case "$host" in >@@ -704,6 +705,17 @@ > SPC_MSG="yes" ], ) > ], > ) >+ AC_ARG_WITH(solaris-projects, >+ [ --with-solaris-projects Enable Solaris projects (experimental)], >+ [ >+ AC_CHECK_LIB(project, setproject, >+ [ AC_DEFINE(USE_SOLARIS_PROJECTS, 1, >+ [Define if you have Solaris projects]) >+ SSHDLIBS="$SSHDLIBS -lproject" >+ AC_SUBST(SSHDLIBS) >+ SP_MSG="yes" ], ) >+ ], >+ ) > ;; > *-*-sunos4*) > CPPFLAGS="$CPPFLAGS -DSUNOS4" >@@ -4213,6 +4225,7 @@ > echo " MD5 password support: $MD5_MSG" > echo " libedit support: $LIBEDIT_MSG" > echo " Solaris process contract support: $SPC_MSG" >+echo " Solaris project support: $SP_MSG" > echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" > echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" > echo " BSD Auth support: $BSD_AUTH_MSG" >diff -ru openssh-SNAP-20100922/session.c openssh-solaris-projects/session.c >--- openssh-SNAP-20100922/session.c Fri Jun 25 19:00:15 2010 >+++ openssh-solaris-projects/session.c Mon Oct 18 16:47:21 2010 >@@ -43,6 +43,9 @@ > #include <sys/socket.h> > #include <sys/un.h> > #include <sys/wait.h> >+#ifdef USE_SOLARIS_PROJECTS >+#include <sys/task.h> >+#endif > > #include <arpa/inet.h> > >@@ -59,6 +62,9 @@ > #include <stdlib.h> > #include <string.h> > #include <unistd.h> >+#ifdef USE_SOLARIS_PROJECTS >+#include <project.h> >+#endif > > #include "openbsd-compat/sys-queue.h" > #include "xmalloc.h" >@@ -935,6 +941,31 @@ > } > > /* >+ * Get/set solaris default project. >+ * If we fail, just run along gracefully. >+ */ >+int >+set_default_project(struct passwd *pw) >+{ >+ struct project *defaultproject; >+ struct project tempproject; >+ char buf[1024]; >+ >+ /* get default project, if we fail just return gracefully */ >+ if ((defaultproject = getdefaultproj(pw->pw_name, &tempproject, &buf, sizeof(buf))) > 0) { >+ /* set default project */ >+ if (setproject(defaultproject->pj_name, pw->pw_name, TASK_NORMAL) != 0) >+ debug("setproject(%s): %s", defaultproject->pj_name, strerror(errno)); >+ } >+ else { >+ /* debug on getdefaultproj() error */ >+ debug("getdefaultproj(%s): %s", pw->pw_name, strerror(errno)); >+ } >+ >+ return 0; >+} >+ >+/* > * Sets the value of the given variable in the environment. If the variable > * already exists, its value is overridden. > */ >@@ -1524,6 +1555,14 @@ > # if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) > irix_setusercontext(pw); > # endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */ >+ >+#ifdef USE_SOLARIS_PROJECTS >+ /* >+ * if solaris projects were detected, set the default now >+ */ >+ set_default_project(pw); >+#endif >+ > # ifdef _AIX > aix_usrinfo(pw); > # endif /* _AIX */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1824
:
1929
| 1937 |
1948