OpenIndiana and Solaris port

This commit is contained in:
Ulrich Wilkens
2014-10-28 19:46:43 +01:00
committed by Jon Trulson
parent 42e891d9e7
commit 01d6c363fa
296 changed files with 1049 additions and 1091 deletions

View File

@@ -106,7 +106,7 @@ SYS_LIBRARIES = -lsec
* on Solaris 2.4 and run on Solaris 2.5. In Solaris 2.4 some of
* libcmd.a functions are also in libauth.so. But on Solaris 2.5
* these Sun private functions have been removed from libauth.so. */
SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lC -lbsm -lcmd $(PAM_LIB)
SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lbsm -lcmd $(PAM_LIB)
EXTRA_DEFINES = -DPAM
@@ -232,6 +232,7 @@ INCLUDES = -I$(XPROJECTROOT)/include/freetype2
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
DEPEND_DEFINES = $(DEPENDDEFINES)
#if defined (HPArchitecture)
DEFINES = $(DTDEFINES) -D_XPG2 -DAUDIT -DBYPASSLOGIN ServerExtraDefines
#elif defined (RsArchitecture)

View File

@@ -98,7 +98,7 @@ XCOMM ##########################################################################
#elif defined (_AIX)
:0 Local local@console /usr/bin/X11/X -T -force :0
#elif defined (sun)
:0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner
:0 Local local_uid@console root /usr/openwin/bin/X :0 -nobanner
#elif defined (__osf__)
#if defined (_NO_CONSOLE)
XCOMM * Local local_uid@console root /usr/bin/X11/X :0 -nice -2

View File

@@ -62,7 +62,8 @@
# include <time.h>
# include <utime.h>
# include <pwd.h>
#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)
#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(sun)
# include <stdarg.h>
#else
# include <varargs.h>

View File

@@ -230,7 +230,7 @@ char bytes[64];
* the OS's random number device.
*/
#if defined(linux) || defined(CSRG_BASED)
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
#define READ_LIMIT (sizeof (long) * 2)
static sumFile (char *name, long sum[2])
@@ -447,7 +447,7 @@ InitCryptoKey( void )
#if defined(linux)
/* non-blocking */
char *key_file = "/dev/urandom";
#elif defined(CSRG_BASED)
#elif defined(CSRG_BASED) || defined(sun)
/* non-blocking */
char *key_file = "/dev/random";
#else

View File

@@ -182,7 +182,7 @@ PamAuthenticate ( char* prog_name,
audit_login_maxtrys();
}
}
#endif sun
#endif
if (status != PAM_SUCCESS) {
sleep(PAM_LOGIN_SLEEPTIME);
@@ -327,7 +327,7 @@ PamAccounting( char* prog_name,
status = solaris_setutmp_mgmt(user, tty_line, display_name,
session_type, entry_type, entry_id);
if (status != SOLARIS_SUCCESS) {
Debug("PamAccounting: LOGIN_PRCESS set_utmp error=%d\n",
Debug("PamAccounting: LOGIN_PROCESS set_utmp error=%d\n",
status);
}
break;

View File

@@ -70,7 +70,7 @@ extern int audit_login_success(void);
extern int audit_login_save_pw(struct passwd *pwd);
extern int audit_login_bad_pw(void);
extern int audit_login_maxtrys(void);
#endif sun
#endif /* sun */
#endif /* _DTLOGIN_PAM_SVC_H */

View File

@@ -360,8 +360,10 @@ userEnv(
env = setEnv (env, "USER", user);
#ifdef sun
if ((Def_path = login_defaults(p,d)) != NULL)
if ((Def_path = login_defaults(p,d)) != NULL) {
env = setEnv (env, "PATH", Def_path);
free(Def_path);
}
#else
if (d->userPath && strlen(d->userPath) > 0)
env = setEnv (env, "PATH", d->userPath);
@@ -457,7 +459,7 @@ login_defaults(
register int flags;
register char *ptr;
char *Def_path;
char final_path[MAXPATHLEN];
char *final_path = malloc(MAXPATHLEN);
char *element;
@@ -474,13 +476,13 @@ login_defaults(
if ((Def_path = defread("SUPATH=")) != NULL)
Def_path = strdup(Def_path);
else
Def_path = DEF_SUPATH;
Def_path = strdup(DEF_SUPATH);
}
else {
if ((Def_path = defread("PATH=")) != NULL)
Def_path = strdup(Def_path);
else
Def_path = DEF_PATH;
Def_path = strdup(DEF_PATH);
}
}