diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -51,20 +51,20 @@ from The Open Group. #endif #ifndef USE_PAM /* PAM modules should handle these */ -#ifdef SECURE_RPC -# include <rpc/rpc.h> -# include <rpc/key_prot.h> -# if !HAVE_DECL_KEY_SETNET +# ifdef SECURE_RPC +# include <rpc/rpc.h> +# include <rpc/key_prot.h> +# if !HAVE_DECL_KEY_SETNET extern int key_setnet(struct key_netstarg *arg); +# endif +# endif +# ifdef K5AUTH +# include <krb5/krb5.h> # endif -#endif -#ifdef K5AUTH -# include <krb5/krb5.h> -#endif #endif /* USE_PAM */ #ifdef __SCO__ -#include <prot.h> +# include <prot.h> #endif #ifndef GREET_USER_STATIC @@ -606,27 +606,27 @@ StartClient ( #endif #ifndef AIXV3 -#ifndef HAS_SETUSERCONTEXT +# ifndef HAS_SETUSERCONTEXT if (setgid(verify->gid) < 0) { LogError ("setgid %d (user \"%s\") failed, errno=%d\n", verify->gid, name, errno); return (0); } -#if defined(BSD) && (BSD >= 199103) +# if defined(BSD) && (BSD >= 199103) if (setlogin(name) < 0) { LogError ("setlogin for \"%s\" failed, errno=%d", name, errno); return(0); } -#endif -#ifndef QNX4 +# endif +# ifndef QNX4 if (initgroups(name, verify->gid) < 0) { LogError ("initgroups for \"%s\" failed, errno=%d\n", name, errno); return (0); } -#endif /* QNX4 doesn't support multi-groups, no initgroups() */ -#endif /* !HAS_SETUSERCONTEXT */ +# endif /* QNX4 doesn't support multi-groups, no initgroups() */ +# endif /* !HAS_SETUSERCONTEXT */ -#ifdef USE_PAM +# ifdef USE_PAM if (pamh) { long i; char **pam_env; @@ -645,15 +645,15 @@ StartClient ( } } -#endif +# endif -#ifndef HAS_SETUSERCONTEXT +# ifndef HAS_SETUSERCONTEXT if (setuid(verify->uid) < 0) { LogError ("setuid %d (user \"%s\") failed, errno=%d\n", verify->uid, name, errno); return (0); } -#else /* HAS_SETUSERCONTEXT */ +# else /* HAS_SETUSERCONTEXT */ /* * Set the user's credentials: uid, gid, groups, * environment variables, resource limits, and umask. @@ -670,7 +670,7 @@ StartClient ( LogError ("getpwnam for \"%s\" failed, errno=%d\n", name, errno); return (0); } -#endif /* HAS_SETUSERCONTEXT */ +# endif /* HAS_SETUSERCONTEXT */ #else /* AIXV3 */ /* * Set the user's credentials: uid, gid, groups, @@ -687,7 +687,7 @@ StartClient ( * for user-based authorization schemes, * use the password to get the user's credentials. */ -#ifdef SECURE_RPC +# ifdef SECURE_RPC /* do like "keylogin" program */ { char netname[MAXNETNAMELEN+1], secretkey[HEXKEYBYTES+1]; @@ -710,7 +710,7 @@ StartClient ( if (key_setnet(&netst) < 0) { Debug ("Could not set secret key.\n"); } - free(netst.st_netname); + free(netst.st_netname); /* is there a key, and do we have the right password? */ if (keyret == 1) { if (*secretkey) { @@ -741,8 +741,8 @@ StartClient ( } bzero(secretkey, strlen(secretkey)); } -#endif -#ifdef K5AUTH +# endif +# ifdef K5AUTH /* do like "kinit" program */ { int i, j; @@ -768,7 +768,7 @@ StartClient ( } } } -#endif /* K5AUTH */ +# endif /* K5AUTH */ #endif /* !USE_PAM */ if (d->windowPath) |