|
Lines 43-48
Link Here
|
| 43 |
#include <sys/socket.h> |
43 |
#include <sys/socket.h> |
| 44 |
#include <sys/un.h> |
44 |
#include <sys/un.h> |
| 45 |
#include <sys/wait.h> |
45 |
#include <sys/wait.h> |
|
|
46 |
#ifdef USE_SOLARIS_PROJECTS |
| 47 |
#include <sys/task.h> |
| 48 |
#endif |
| 46 |
|
49 |
|
| 47 |
#include <arpa/inet.h> |
50 |
#include <arpa/inet.h> |
| 48 |
|
51 |
|
|
Lines 59-64
Link Here
|
| 59 |
#include <stdlib.h> |
62 |
#include <stdlib.h> |
| 60 |
#include <string.h> |
63 |
#include <string.h> |
| 61 |
#include <unistd.h> |
64 |
#include <unistd.h> |
|
|
65 |
#ifdef USE_SOLARIS_PROJECTS |
| 66 |
#include <project.h> |
| 67 |
#endif |
| 62 |
|
68 |
|
| 63 |
#include "openbsd-compat/sys-queue.h" |
69 |
#include "openbsd-compat/sys-queue.h" |
| 64 |
#include "xmalloc.h" |
70 |
#include "xmalloc.h" |
|
Lines 935-940
Link Here
|
| 935 |
} |
941 |
} |
| 936 |
|
942 |
|
| 937 |
/* |
943 |
/* |
|
|
944 |
* Get/set solaris default project. |
| 945 |
* If we fail, just run along gracefully. |
| 946 |
*/ |
| 947 |
int |
| 948 |
set_default_project(struct passwd *pw) |
| 949 |
{ |
| 950 |
struct project *defaultproject; |
| 951 |
struct project tempproject; |
| 952 |
char buf[1024]; |
| 953 |
|
| 954 |
/* get default project, if we fail just return gracefully */ |
| 955 |
if ((defaultproject = getdefaultproj(pw->pw_name, &tempproject, &buf, sizeof(buf))) > 0) { |
| 956 |
/* set default project */ |
| 957 |
if (setproject(defaultproject->pj_name, pw->pw_name, TASK_NORMAL) != 0) |
| 958 |
debug("setproject(%s): %s", defaultproject->pj_name, strerror(errno)); |
| 959 |
} |
| 960 |
else { |
| 961 |
/* debug on getdefaultproj() error */ |
| 962 |
debug("getdefaultproj(%s): %s", pw->pw_name, strerror(errno)); |
| 963 |
} |
| 964 |
|
| 965 |
return 0; |
| 966 |
} |
| 967 |
|
| 968 |
/* |
| 938 |
* Sets the value of the given variable in the environment. If the variable |
969 |
* Sets the value of the given variable in the environment. If the variable |
| 939 |
* already exists, its value is overridden. |
970 |
* already exists, its value is overridden. |
| 940 |
*/ |
971 |
*/ |
|
Lines 1524-1529
Link Here
|
| 1524 |
# if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) |
1555 |
# if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) |
| 1525 |
irix_setusercontext(pw); |
1556 |
irix_setusercontext(pw); |
| 1526 |
# endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */ |
1557 |
# endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */ |
|
|
1558 |
|
| 1559 |
#ifdef USE_SOLARIS_PROJECTS |
| 1560 |
/* |
| 1561 |
* if solaris projects were detected, set the default now |
| 1562 |
*/ |
| 1563 |
set_default_project(pw); |
| 1564 |
#endif |
| 1565 |
|
| 1527 |
# ifdef _AIX |
1566 |
# ifdef _AIX |
| 1528 |
aix_usrinfo(pw); |
1567 |
aix_usrinfo(pw); |
| 1529 |
# endif /* _AIX */ |
1568 |
# endif /* _AIX */ |