Remove apollo support
This commit is contained in:
@@ -162,28 +162,28 @@ INCLUDES = -I$(XPROJECTROOT)/include/freetype2
|
||||
SRCS1 = access.c account.c auth.c genauth.c daemon.c dm.c \
|
||||
dpylist.c error.c file.c mitauth.c protodpy.c policy.c \
|
||||
reset.c resource.c server.c session.c socket.c util.c \
|
||||
verify.c version.c apollo.c sysauth.c fontpath.c $(DESSRCS) \
|
||||
verify.c version.c sysauth.c fontpath.c $(DESSRCS) \
|
||||
qualify.c choose.c netaddr.c xdmcp.c \
|
||||
$(PAM_SRCS) $(SOLARIS_SRCS)
|
||||
|
||||
OBJS1 = access.o account.o auth.o genauth.o daemon.o dm.o \
|
||||
dpylist.o error.o file.o mitauth.o protodpy.o policy.o \
|
||||
reset.o resource.o server.o session.o socket.o util.o \
|
||||
verify.o version.o apollo.o sysauth.o fontpath.o $(DESOBJS) \
|
||||
verify.o version.o sysauth.o fontpath.o $(DESOBJS) \
|
||||
qualify.o choose.o netaddr.o xdmcp.o \
|
||||
$(PAM_OBJS) $(SOLARIS_OBJS)
|
||||
|
||||
PROG2 = dtgreet
|
||||
#ifdef AlphaArchitecture
|
||||
SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c \
|
||||
vgversion.c vgapollo.c vglang.c vgsiaform.c
|
||||
vgversion.c vglang.c vgsiaform.c
|
||||
OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o \
|
||||
vgversion.o vgapollo.o vglang.o vgsiaform.o
|
||||
vgversion.o vglang.o vgsiaform.o
|
||||
#else
|
||||
SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c \
|
||||
vgversion.c vgapollo.c vglang.c
|
||||
vgversion.c vglang.c
|
||||
OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o \
|
||||
vgversion.o vgapollo.o vglang.o
|
||||
vgversion.o vglang.o
|
||||
#endif
|
||||
|
||||
PROG3 = dtchooser
|
||||
|
||||
@@ -43,14 +43,8 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifdef __apollo
|
||||
#include <X11/apollosys.h> /* for pid_t struct in hp-ux sys/types.h */
|
||||
#include <sys/types.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#ifdef AIXV3
|
||||
#include <usersec.h>
|
||||
|
||||
@@ -1,178 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: apollo.c /main/4 1995/10/27 16:11:14 rswiston $ */
|
||||
/* *
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: apollo.c
|
||||
**
|
||||
** Project: HP Visual User Environment (DT)
|
||||
**
|
||||
** Description: Dtlogin user setup routines for Domain/OS 10.4
|
||||
**
|
||||
** These routines set up the user's state before starting
|
||||
** the DT session.
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
|
||||
**
|
||||
**
|
||||
** Conditional compiles:
|
||||
**
|
||||
** __apollo Domain OS only
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
|
||||
#include <stdio.h> /* just so file isn't empty */
|
||||
|
||||
#ifdef __apollo
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Includes & Defines
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include <pwd.h>
|
||||
|
||||
#include <apollo/base.h>
|
||||
#include <apollo/error.h>
|
||||
|
||||
#include "apollo/passwd.h" /* copy of <apollo/sys/passwd.h> */
|
||||
#include "apollo/login.h" /* copy of <apollo/sys/login.h> */
|
||||
|
||||
#include "dm.h"
|
||||
#include "vgmsg.h"
|
||||
|
||||
|
||||
#define SCMPN(a, b) strncmp(a, b, sizeof(a))
|
||||
#define SCPYN(a, b) strncpy(a, b, sizeof(a))
|
||||
#define eq(a,b) !strcmp(a,b)
|
||||
|
||||
#define NMAX strlen(name)
|
||||
#define HMAX strlen(host)
|
||||
|
||||
#define STRING(str) (str), (short) strlen(str)
|
||||
#define STRNULL(s, l) ((s)[(l)] = '\0')
|
||||
#define ISTRING(str) (str), (int) strlen(str)
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* External declarations
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Procedure declarations
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Global variables
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Stub routines
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* DoLogin
|
||||
*
|
||||
* set up user environment
|
||||
***************************************************************************/
|
||||
|
||||
int
|
||||
DoLogin( char *user, char *passwd, char *host )
|
||||
{
|
||||
ios_$id_t logid;
|
||||
login_$opt_set_t opts;
|
||||
status_$t status;
|
||||
error_$string_t subsystem, module, error;
|
||||
short sslen, modlen, errlen;
|
||||
char buf[BUFSIZ];
|
||||
|
||||
Debug("DoLogin(): for %s\n", user);
|
||||
login_$set_host(host, strlen(host));
|
||||
|
||||
opts = login_$no_prompt_name_sm |
|
||||
login_$no_prompt_pass_sm |
|
||||
login_$addut_sm |
|
||||
login_$chown_tty_sm;
|
||||
|
||||
Debug("DoLogin(): before calling login_$chk_login()\n");
|
||||
if ((!login_$chk_login(opts, STRING(user), STRING(passwd),
|
||||
(login_$open_log_p) NULL, STRING(""),
|
||||
&logid, &status))
|
||||
&& (status.all != status_$ok)) {
|
||||
|
||||
Debug("DoLogin(): login_$chk_login() failed\n");
|
||||
error_$get_text(status, subsystem, &sslen, module, &modlen,
|
||||
error, &errlen);
|
||||
STRNULL(error, errlen);
|
||||
STRNULL(module, modlen);
|
||||
STRNULL(subsystem, sslen);
|
||||
sprintf(buf,ReadCatalog(MC_LOG_SET,MC_LOG_DOMAIN,MC_DEF_LOG_DOMAIN),
|
||||
error, subsystem, module);
|
||||
LogError (buf);
|
||||
|
||||
bzero (passwd, strlen(passwd));
|
||||
|
||||
return (false);
|
||||
}
|
||||
|
||||
Debug("DoLogin(): login_$chk_login() succeeded\n");
|
||||
|
||||
/*
|
||||
* clear password...
|
||||
*/
|
||||
bzero (passwd, strlen(passwd));
|
||||
|
||||
return (true);
|
||||
}
|
||||
#endif
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: des.h /main/3 1995/10/27 16:19:08 rswiston $ */
|
||||
/* *
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/*
|
||||
{ DES, USX/LIB/DESLIB, PJL, 04/05/82 }
|
||||
{ DES routines }
|
||||
|
||||
{ CHANGES:
|
||||
12/21/88 gilbert Modifications for C++.
|
||||
03/25/88 brian Created ANSI C version
|
||||
01/13/86 nazgul Created C version
|
||||
08/25/83 spf Added us_des_ins_pas declaration
|
||||
}
|
||||
*/
|
||||
|
||||
#ifndef apollo_sys_des_h
|
||||
#define apollo_sys_des_h
|
||||
|
||||
|
||||
/* Enable function prototypes for ANSI C and C++ */
|
||||
#if defined(__STDC__) || defined(c_plusplus) || defined(__cplusplus)
|
||||
# define _PROTOTYPES
|
||||
#endif
|
||||
|
||||
/* Required for C++ V2.0 */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _PROTOTYPES
|
||||
#define std_$call extern
|
||||
#endif
|
||||
|
||||
typedef char des_$key[8];
|
||||
|
||||
/*
|
||||
packed record { NOTE THIS WELL!!! }
|
||||
bits: 0..127; { 56 bits: LEFT ADJUSTED in 8 bytes }
|
||||
parity: 0..1 { reserved for parity, but ignored }
|
||||
end;
|
||||
*/
|
||||
|
||||
typedef char des_$text[8]; /* Actually a 64 bit set */
|
||||
|
||||
typedef char des_$key_sched[16][8];
|
||||
|
||||
std_$call void des_$encrypt(
|
||||
#ifdef _PROTOTYPES
|
||||
des_$text & plain, /* input 64 bits to encrypt */
|
||||
des_$text * cipher, /* ...get back result */
|
||||
des_$key_sched & key_sched /* made with des_$compute_key_sched */
|
||||
#endif
|
||||
);
|
||||
|
||||
std_$call void des_$decrypt(
|
||||
#ifdef _PROTOTYPES
|
||||
des_$text & cipher, /* input 64 bits to decrypt */
|
||||
des_$text * plain, /* ...get back result */
|
||||
des_$key_sched & key_sched /* made with des_$compute_key_sched */
|
||||
#endif
|
||||
);
|
||||
|
||||
std_$call void des_$compute_key_sched(
|
||||
#ifdef _PROTOTYPES
|
||||
des_$key & key, /* eight byte key */
|
||||
des_$key_sched * key_sched /* output key schedule */
|
||||
#endif
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: login.h /main/3 1995/10/27 16:19:16 rswiston $ */
|
||||
/* *
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/* LOGIN.INS.C, /us/ins, rod, 12/09/88 */
|
||||
|
||||
/* changes:
|
||||
12/21/88 gilbert Modifications for C++.
|
||||
12/09/88 betsy add login_$logins_disabled
|
||||
04/19/88 betsy cast values for login_$opt_set_t ( to be consistent )
|
||||
03/30/88 betsy add login_$set_host
|
||||
03/21/88 betsy add options login_$addut & login_$chown_tty
|
||||
01/04/88 brian Fixed param decl of login_$chk_login
|
||||
12/31/87 brian Converted to ANSII from /us/ins/login.ins.c/6
|
||||
*/
|
||||
|
||||
#define login_$mod 2
|
||||
|
||||
#define login_$err_shut 0x07020001 /*user wants to caller to shut down*/
|
||||
#define login_$err_exit 0x07020002 /*user wants to caller to exit*/
|
||||
#define login_$no_room 0x07020003 /*no room for rep at open */
|
||||
#define login_$bad_passwd 0x07020004 /*passwd check failed */
|
||||
#define login_$inv_acct 0x07020005 /* account expired */
|
||||
#define login_$logins_disabled 0x07020006 /* logins disabled */
|
||||
|
||||
#define login_$log_stream_index 4 /* 4th stream in streams array is the open log */
|
||||
|
||||
|
||||
typedef void *login_$ptr;
|
||||
|
||||
typedef short enum { login_$read, login_$update } login_$mode_t;
|
||||
|
||||
typedef short enum {
|
||||
login_$log_events, /* log all events */
|
||||
login_$log_inv_only, /* log only unsuccessful attempts to log in */
|
||||
login_$no_passwd, /* don't require password (!) */
|
||||
login_$no_setsid, /* implies no_setpm, but allows set of wd/nd */
|
||||
login_$no_setpm, /* not done unless setsid successfully done */
|
||||
login_$no_setwd, /* not done if setsid attempted and failed */
|
||||
login_$fail_ret, /* return if failure logged */
|
||||
login_$no_prompt_name, /* no prompt for name */
|
||||
login_$no_prompt_pass, /* no prompt for password */
|
||||
login_$preserve_sub, /* preserve subsystem */
|
||||
login_$leave_log_open, /* leave log file open on return */
|
||||
login_$addut, /* add utmp/wtmp/lastlog entry */
|
||||
login_$chown_tty, /* chown the login device */
|
||||
login_$extra14, /* pad to 32-bit set */
|
||||
login_$extra15,
|
||||
login_$extra16,
|
||||
login_$extra17 /* just over the border */
|
||||
} login_$opt_t;
|
||||
|
||||
typedef long login_$opt_set_t;
|
||||
#define login_$log_events_sm ((login_$opt_set_t) (1 << (int) login_$log_events))
|
||||
#define login_$log_inv_only_sm ((login_$opt_set_t) (1 << (int) login_$log_inv_only))
|
||||
#define login_$no_passwd_sm ((login_$opt_set_t) (1 << (int) login_$no_passwd))
|
||||
#define login_$no_setsid_sm ((login_$opt_set_t) (1 << (int) login_$no_setsid))
|
||||
#define login_$no_setpm_sm ((login_$opt_set_t) (1 << (int) login_$no_setpm))
|
||||
#define login_$no_setwd_sm ((login_$opt_set_t) (1 << (int) login_$no_setwd))
|
||||
#define login_$fail_ret_sm ((login_$opt_set_t) (1 << (int) login_$fail_ret))
|
||||
#define login_$no_prompt_name_sm ((login_$opt_set_t) (1 << (int) login_$no_prompt_name))
|
||||
#define login_$no_prompt_pass_sm ((login_$opt_set_t) (1 << (int) login_$no_prompt_pass))
|
||||
#define login_$preserve_sub_sm ((login_$opt_set_t) (1 << (int) login_$preserve_sub))
|
||||
#define login_$leave_log_open_sm ((login_$opt_set_t) (1 << (int) login_$leave_log_open))
|
||||
#define login_$addut_sm ((login_$opt_set_t) (1 << (int) login_$addut))
|
||||
#define login_$chown_tty_sm ((login_$opt_set_t) (1 << (int) login_$chown_tty))
|
||||
|
||||
typedef char login_$string_t[256];
|
||||
typedef ios_$id_t login_$streams_t[4];
|
||||
|
||||
typedef char (*login_$open_log_p)(
|
||||
char * log_file,
|
||||
short & log_flen,
|
||||
stream_$id_t * logstr
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
int (*help)(stream_$id_t & stream);
|
||||
login_$open_log_p open_log;
|
||||
/* A note to you: aug-87
|
||||
These next two routines are here only for callers that cannot provide streams
|
||||
for their i/o (i.e. the dm. It was just too hard, esp since he is 'going away'.)
|
||||
To have them used, pass the number -2 as your first stream in login_$streams_t.
|
||||
A bit of a hack, true, but as long as we all understand each other, it will work.
|
||||
Login_$login promises NOT to ref these routines if you pass real streams. (Note
|
||||
that the fillbuf stuff is gone (since changing home dir is no longer supported.)
|
||||
*/
|
||||
short (*pread)(
|
||||
stream_$id_t & stream,
|
||||
char * inbuf,
|
||||
short & inlen,
|
||||
char * pstr,
|
||||
short & plen,
|
||||
boolean & echo,
|
||||
char * fillbuf, /* pre-fill buffer with string */
|
||||
short & fillbuflen
|
||||
);
|
||||
int (*pwrite)(
|
||||
stream_$id_t & stream,
|
||||
char * pstr,
|
||||
short & plen
|
||||
);
|
||||
} login_$proc_rec_t;
|
||||
|
||||
|
||||
/* Required for C++ V2.0 */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* FULL_LOGIN --- performs the login function with prompting, implementing system policy,
|
||||
setting wd, nd, pm_$sid_text, pm_$home_txt and default shell (unless
|
||||
already set), prints /etc/dmmsg if exists. Supports 'shut, 'exit' and
|
||||
'help' and all options EXCEPT login_$no_setsid. Takes optional strings
|
||||
for pre-read user name [passwd]. */
|
||||
extern boolean
|
||||
login_$full_login(
|
||||
login_$opt_set_t & opts,
|
||||
login_$streams_t * streams, /* in, out, err, log_stream */
|
||||
char * login_name, /* login string - iff login_$no_prompt_name */
|
||||
short & login_nlen,
|
||||
char * pass, /* passwd string - iff login_$no_prompt_pass */
|
||||
short & passlen,
|
||||
login_$proc_rec_t & ioprocs, /* procedure vectors */
|
||||
char * log_file, /* used iff login_$log_events/inv in opts */
|
||||
short & log_flen,
|
||||
status_$t * status
|
||||
);
|
||||
|
||||
/* CHK_LOGIN --- performs the login function based on the strings passed in with no
|
||||
prompting. DOES NOT fully implement system policy. i.e. does nothing
|
||||
if passwd needs to be changed, but returns bad status if expired or
|
||||
invalid accounts. Gives no error msgs. */
|
||||
extern boolean
|
||||
login_$chk_login (
|
||||
login_$opt_set_t & opts,
|
||||
char * login_name, /* login string - iff login_$no_prompt_name */
|
||||
short & login_nlen,
|
||||
char * pass, /* passwd string - iff login_$no_prompt_pass */
|
||||
short & passlen,
|
||||
login_$open_log_p & open_log, /* used iff login_$log_events/inv in opts */
|
||||
char * log_file, /* used iff login_$log_events/inv in opts */
|
||||
short & log_flen, /* used iff login_$log_events/inv in opts */
|
||||
ios_$id_t * log_stream, /* stream for open log file iff login_$leave_log_open */
|
||||
status_$t * status
|
||||
);
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
LOGIN_$SET_HOST - sets the host name to be used in the addut on a subsequent
|
||||
login_$full_login or login_$chk_login call */
|
||||
extern void
|
||||
login_$set_host(
|
||||
char * host_name, /* max len is 64 */
|
||||
int & host_len
|
||||
);
|
||||
|
||||
/* O P E N --- prepare to do login type stuff */
|
||||
extern void
|
||||
login_$open(
|
||||
login_$mode_t & lmode,
|
||||
login_$ptr * lptr,
|
||||
status_$t * st
|
||||
);
|
||||
|
||||
/* S E T _ P P O -- set the PPO to operate on
|
||||
if ppo length is zero, use currently logged in user's PPO
|
||||
if set_ppo not call before chpass, ckpass or chhdir called, one
|
||||
will automatically be done (for current user)
|
||||
*/
|
||||
extern void
|
||||
login_$set_ppo(
|
||||
login_$ptr & lptr,
|
||||
char * ppo,
|
||||
short & plen,
|
||||
status_$t * st
|
||||
);
|
||||
|
||||
/* C K P A S S -- check password
|
||||
checks the supplied password against that of the set PPO
|
||||
*/
|
||||
extern void
|
||||
login_$ckpass(
|
||||
login_$ptr & lptr,
|
||||
char * pass,
|
||||
short & plen,
|
||||
status_$t * st
|
||||
);
|
||||
|
||||
/* C H P A S S --- change password in the registry */
|
||||
extern void
|
||||
login_$chpass(
|
||||
login_$ptr & lptr,
|
||||
char * pass,
|
||||
short & plen,
|
||||
status_$t * st
|
||||
);
|
||||
|
||||
/* C H H D I R --- change home directory in the registry */
|
||||
extern void
|
||||
login_$chhdir(
|
||||
login_$ptr & lptr,
|
||||
char * hdir,
|
||||
short & hlen,
|
||||
status_$t * st
|
||||
);
|
||||
|
||||
/* E R R _ C O N T E X T --- file name that had problems */
|
||||
extern void
|
||||
login_$err_context(
|
||||
login_$ptr & lptr,
|
||||
status_$t * errst,
|
||||
char * badf,
|
||||
short * blen,
|
||||
status_$t * st
|
||||
);
|
||||
|
||||
/* C L O S E --- release all acquired resources */
|
||||
/* NOTE --- call even if open FAILS! */
|
||||
extern void
|
||||
login_$close(
|
||||
login_$ptr & lptr,
|
||||
status_$t * st
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: passwd.h /main/3 1995/10/27 16:19:23 rswiston $ */
|
||||
/* *
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/* passwd.h us/unix/include/apollo/sys, brian
|
||||
Password definitions
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
| THE FOLLOWING PROGRAMS ARE THE SOLE PROPERTY OF APOLLO COMPUTER INC. |
|
||||
| AND CONTAIN ITS PROPRIETARY AND CONFIDENTIAL INFORMATION. |
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
Changes:
|
||||
12/27/88 gilbert Modifications for C++.
|
||||
03/25/88 brian ANSI version (from .ins.c)
|
||||
11/05/87 betsy need to include des.ins.c
|
||||
08/31/87 betsy add support for unix encryption, remove passwd_$create
|
||||
for sr10 registry
|
||||
07/07/87 pato drop the (wrong) explicit values for passwd_$encrypt_t
|
||||
04/02/86 lwa Change enum to short enum.
|
||||
01/13/86 nazgul Created C version
|
||||
04/05/82 PJL changes for DES encryption
|
||||
*/
|
||||
|
||||
#ifndef apollo_sys_passwd_ins_c
|
||||
#define apollo_sys_passwd_ins_c
|
||||
|
||||
|
||||
/* Enable function prototypes for ANSI C and C++ */
|
||||
#if defined(__STDC__) || defined(c_plusplus) || defined(__cplusplus)
|
||||
# define _PROTOTYPES
|
||||
#endif
|
||||
|
||||
/* Required for C++ V2.0 */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _PROTOTYPES
|
||||
#define std_$call extern
|
||||
#endif
|
||||
|
||||
#include "apollo/des.h" /* copy from <apollo/sys/des.h> */
|
||||
|
||||
#define passwd_$mod 3
|
||||
#define passwd_$maxlen 8
|
||||
|
||||
typedef short enum { passwd_$none, passwd_$des,
|
||||
passwd_$unix, passwd_$unix_bits } passwd_$encrypt_t;
|
||||
typedef struct {
|
||||
passwd_$encrypt_t ptype;
|
||||
union {
|
||||
char plain[8]; /* passwd_$none */
|
||||
struct { /* passwd_$des, passwd_$unix_bits */
|
||||
short rand;
|
||||
des_$text bits;
|
||||
} des;
|
||||
struct { /* passwd_$unix */
|
||||
char salt[2];
|
||||
char cipher[12];
|
||||
} unix_encrypted;
|
||||
} pw_union;
|
||||
} passwd_$rec_t;
|
||||
|
||||
typedef char passwd_$str_t[passwd_$maxlen];
|
||||
|
||||
std_$call boolean passwd_$check(
|
||||
#ifdef _PROTOTYPES
|
||||
passwd_$str_t & pass_str,
|
||||
short & pass_len,
|
||||
passwd_$rec_t & enc_passwd,
|
||||
status_$t * status
|
||||
#endif
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -91,9 +91,7 @@ XCOMM interest.
|
||||
XCOMM
|
||||
XCOMM ##########################################################################
|
||||
|
||||
#if defined (__apollo)
|
||||
* Local local /etc/Xdomain :0
|
||||
#elif defined (_AIX) && defined (AIXV4)
|
||||
#if defined (_AIX) && defined (AIXV4)
|
||||
:0 Local local@console /usr/lpp/X11/defaults/xserverrc -T -force :0
|
||||
#elif defined (_AIX)
|
||||
:0 Local local@console /usr/bin/X11/X -T -force :0
|
||||
|
||||
@@ -895,7 +895,6 @@ StartDisplay(
|
||||
kill (d->serverPid, d->resetSignal);
|
||||
}
|
||||
|
||||
#ifndef __apollo
|
||||
/*
|
||||
* initialize d->utmpId. Check to see if anyone else is using
|
||||
* the requested ID. Always allow the first request for "dt" to
|
||||
@@ -932,7 +931,6 @@ StartDisplay(
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* set d->gettyLine to "console" for display ":0" if it is not
|
||||
@@ -1484,7 +1482,7 @@ SetTitle( char *name, char *ptr )
|
||||
#define GETTYPATH "/usr/libexec/getty"
|
||||
#elif defined(__linux__)
|
||||
#define GETTYPATH "/sbin/getty"
|
||||
#elif !defined (__apollo)
|
||||
#else
|
||||
#define GETTYPATH "/etc/getty"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -582,14 +582,6 @@ extern int UtmpIdOpen(
|
||||
char *utmpId) ;
|
||||
|
||||
|
||||
/******************************* apollo.c **************************/
|
||||
|
||||
extern int DoLogin(
|
||||
char *user,
|
||||
char *passwd,
|
||||
char *host) ;
|
||||
|
||||
|
||||
/******************************* auth.c **************************/
|
||||
|
||||
extern int ConvertAddr(
|
||||
|
||||
@@ -216,11 +216,8 @@ static char AppName[16] = DTLOGIN;
|
||||
#endif
|
||||
|
||||
#ifndef DEF_LANG /* LANG default settings for various architectures */
|
||||
# ifdef __apollo
|
||||
# define DEF_LANG "C"
|
||||
# endif
|
||||
# ifdef sun /* default language under Solaris */
|
||||
# define DEF_LANG "C"
|
||||
# define DEF_LANG "C"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -614,7 +611,7 @@ LoadDMResources( void )
|
||||
keyFile = getFullFileName(keyFile, 0, NULL);
|
||||
accessFile = getFullFileName(accessFile, 0, NULL);
|
||||
|
||||
#ifndef __apollo /* set a TZ default for all OS except Domain */
|
||||
/* set a TZ default */
|
||||
if (timeZone == NULL || strlen(timeZone) == 0)
|
||||
{
|
||||
/*
|
||||
@@ -622,7 +619,6 @@ LoadDMResources( void )
|
||||
*/
|
||||
GetSysParms(&timeZone,0,0);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -134,11 +134,6 @@ static int sia_exit_proc_reg = FALSE;
|
||||
|
||||
#endif /* SIA */
|
||||
|
||||
|
||||
#ifdef __apollo
|
||||
extern char *getenv();
|
||||
#endif
|
||||
|
||||
#define GREET_STATE_LOGIN 0
|
||||
#define GREET_STATE_AUTHENTICATE 1
|
||||
#define GREET_STATE_EXIT 2
|
||||
@@ -1418,30 +1413,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp )
|
||||
Debug("BLS - Session setup complete.\n");
|
||||
} else {
|
||||
#endif /* BLS */
|
||||
|
||||
#ifdef __apollo
|
||||
|
||||
/*
|
||||
* This should never fail since everything has been verified already.
|
||||
* If it does it must mean registry strangeness, so exit, and try
|
||||
* again...
|
||||
*/
|
||||
|
||||
if (!DoLogin (user, greet.password, d->name)) exit (1);
|
||||
|
||||
/*
|
||||
* extract the SYSTYPE and ISP environment values and set into user's
|
||||
* environment. This is necessary since we do an execve below...
|
||||
*/
|
||||
|
||||
verify->userEnviron = setEnv(verify->userEnviron, "SYSTYPE",
|
||||
getenv("SYSTYPE"));
|
||||
|
||||
verify->userEnviron = setEnv(verify->userEnviron, "ISP",
|
||||
getenv("ISP"));
|
||||
|
||||
#else /* ! __apollo */
|
||||
|
||||
|
||||
# ifdef __AFS
|
||||
if ( IsVerifyName(VN_AFS) ) {
|
||||
@@ -1525,8 +1496,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp )
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __apollo */
|
||||
|
||||
#ifdef BLS
|
||||
} /* ends the else clause of if ( ISSECURE ) */
|
||||
#endif /* BLS */
|
||||
@@ -1655,7 +1624,7 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp )
|
||||
|
||||
failsafeArgv[i++] = "-e";
|
||||
failsafeArgv[i++] = "/bin/passwd";
|
||||
#if defined (__apollo) || defined(__PASSWD_ETC)
|
||||
#if defined(__PASSWD_ETC)
|
||||
failsafeArgv[i++] = "-n";
|
||||
#endif
|
||||
failsafeArgv[i++] = getEnv (verify->userEnviron, "USER");
|
||||
@@ -2077,15 +2046,6 @@ RunGreeter( struct display *d, struct greet_info *greet,
|
||||
env = setEnv(env, "OPENWINHOME", path);
|
||||
#endif
|
||||
|
||||
#ifdef __apollo
|
||||
/*
|
||||
* set environment for Domain machines...
|
||||
*/
|
||||
env = setEnv(env, "ENVIRONMENT", "bsd");
|
||||
env = setEnv(env, "SYSTYPE", "bsd4.3");
|
||||
#endif
|
||||
|
||||
|
||||
Debug ("Greeter environment:\n");
|
||||
printEnv(env);
|
||||
Debug ("End of Greeter environment:\n");
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
** Platform identification:
|
||||
**
|
||||
** __hpux HP-UX OS only
|
||||
** __apollo Domain OS only
|
||||
** sun SUN OS only
|
||||
** SVR4 SUN OS et al.
|
||||
** _AIX AIX only
|
||||
@@ -115,7 +114,7 @@
|
||||
/*
|
||||
* Define as generic those without platform specific code.
|
||||
*/
|
||||
#if !(defined(__hpux) || defined(__apollo) || defined(_AIX) || defined(sun))
|
||||
#if !(defined(__hpux) || defined(_AIX) || defined(sun))
|
||||
#define generic
|
||||
#endif
|
||||
|
||||
@@ -704,7 +703,7 @@ CheckPassword( char *name, char *passwd, struct passwd **ppwd )
|
||||
|
||||
#ifdef __PASSWD_ETC
|
||||
/*
|
||||
* If regular passwd check fails, try old-style Apollo SR
|
||||
* If regular passwd check fails, try old-style SR
|
||||
*/
|
||||
|
||||
if (rgy_$is_des(passwd, strlen(passwd), p->pw_passwd) == TRUE)
|
||||
|
||||
@@ -1,368 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: vgapollo.c /main/4 1995/10/27 16:17:06 rswiston $ */
|
||||
/* *
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: vgapollo.c
|
||||
**
|
||||
** Project: HP Visual User Environment (DT)
|
||||
**
|
||||
** Description: Dtgreet user authentication routines for Domain/OS 10.4
|
||||
**
|
||||
** These routines validate the user; checking name, password,
|
||||
** home directory, password aging, etc.
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
|
||||
**
|
||||
**
|
||||
** Conditional compiles:
|
||||
**
|
||||
** __apollo Domain OS only
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
|
||||
#include <stdio.h> /* placed here so file isn't empty */
|
||||
#include "vgmsg.h"
|
||||
|
||||
#ifdef __apollo
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Includes & Defines
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include <pwd.h>
|
||||
|
||||
#include <apollo/base.h>
|
||||
#include <apollo/error.h>
|
||||
|
||||
#include "apollo/passwd.h" /* copy of <apollo/sys/passwd.h> */
|
||||
#include "apollo/login.h" /* copy of <apollo/sys/login.h> */
|
||||
#include "apollo/rgy_base.h"
|
||||
|
||||
#include "vg.h"
|
||||
|
||||
|
||||
#define SCMPN(a, b) strncmp(a, b, sizeof(a))
|
||||
#define SCPYN(a, b) strncpy(a, b, sizeof(a))
|
||||
#define eq(a,b) !strcmp(a,b)
|
||||
|
||||
#define NMAX strlen(name)
|
||||
#define HMAX strlen(host)
|
||||
|
||||
#define STRING(str) (str), (short) strlen(str)
|
||||
#define STRNULL(s, l) ((s)[(l)] = '\0')
|
||||
#define ISTRING(str) (str), (int) strlen(str)
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* External declarations
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Procedure declarations
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
static boolean CheckLogin( char *user, char *passwd, char *host,
|
||||
status_$t *status)
|
||||
static boolean CheckPassword( char *user, char *passwd) ;
|
||||
static int PasswordAged( register struct passwd *pw) ;
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Global variables
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
rgy_$policy_t policy;
|
||||
rgy_$acct_user_t user_part;
|
||||
rgy_$acct_admin_t admin_part;
|
||||
extern struct passwd * getpwnam_full();
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Stub routines
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* CheckLogin
|
||||
*
|
||||
* check validity of user name, password and other login parameters
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
static boolean
|
||||
CheckLogin( char *user, char *passwd, char *host, status_$t *status)
|
||||
{
|
||||
ios_$id_t logid;
|
||||
login_$opt_set_t opts;
|
||||
|
||||
login_$set_host(host, strlen(host));
|
||||
|
||||
opts = login_$no_setsid_sm |
|
||||
login_$no_setwd_sm |
|
||||
login_$no_prompt_pass;
|
||||
|
||||
if ( !login_$chk_login(opts,
|
||||
STRING(user),
|
||||
STRING(passwd),
|
||||
(login_$open_log_p) NULL,
|
||||
STRING(""),
|
||||
&logid,
|
||||
status)) {
|
||||
|
||||
return(false);
|
||||
|
||||
} else
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* CheckPassword
|
||||
*
|
||||
* check validity of just user name and password
|
||||
***************************************************************************/
|
||||
|
||||
static boolean
|
||||
CheckPassword( char *user, char *passwd )
|
||||
{
|
||||
login_$ptr lptr;
|
||||
status_$t status;
|
||||
|
||||
login_$open((login_$mode_t) 0, &lptr, &status);
|
||||
if (status.all == status_$ok)
|
||||
login_$set_ppo(lptr, STRING(user), &status);
|
||||
if (status.all == status_$ok)
|
||||
login_$ckpass(lptr, STRING(passwd), &status);
|
||||
|
||||
return (status.all == status_$ok);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* PasswordAged
|
||||
*
|
||||
* see if password has aged
|
||||
***************************************************************************/
|
||||
|
||||
static int
|
||||
PasswordAged( register struct passwd *pw )
|
||||
{
|
||||
|
||||
boolean lrgy;
|
||||
|
||||
/* Account validity checks: If we were able to connect to the network
|
||||
* registry, then we've acquired account and policy data and can perform
|
||||
* account/password checking
|
||||
*/
|
||||
|
||||
lrgy = rgy_$using_local_registry();
|
||||
if ( !lrgy ) {
|
||||
|
||||
/* Check for password expiration or invalidity */
|
||||
if (rgy_$is_passwd_expired(&user_part, &policy ) == true ||
|
||||
rgy_$is_passwd_invalid(&user_part) == true) {
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Verify
|
||||
*
|
||||
* verify the user
|
||||
*
|
||||
* return codes indicate authentication results.
|
||||
***************************************************************************/
|
||||
|
||||
#define MAXATTEMPTS 5
|
||||
|
||||
extern Widget focusWidget; /* login or password text field */
|
||||
struct passwd nouser = {"", "nope"}; /* invalid user password struct */
|
||||
|
||||
int
|
||||
Verify( char *name, char *passwd )
|
||||
{
|
||||
|
||||
static int login_attempts = 0; /* # failed authentications */
|
||||
|
||||
struct passwd *p; /* password structure */
|
||||
char *host; /* host that login is coming in from */
|
||||
status_$t status; /* status code returned by CheckLogin */
|
||||
|
||||
int n;
|
||||
|
||||
host = dpyinfo.name;
|
||||
|
||||
|
||||
/*
|
||||
* look up entry from registry...
|
||||
*
|
||||
* need getpwnam_full to get policy data for passwd expiration
|
||||
* or invalidity...
|
||||
*/
|
||||
p = getpwnam_full(name, &user_part, &admin_part, &policy);
|
||||
/* p = getpwnam(name);*/
|
||||
|
||||
if (!p || strlen(name) == 0 || p->pw_name == NULL )
|
||||
p = &nouser;
|
||||
|
||||
|
||||
/*
|
||||
* validate user/password...
|
||||
*/
|
||||
|
||||
if (!CheckLogin(name, passwd, host, &status)) {
|
||||
|
||||
/*
|
||||
* if verification failed, but was just a name check, prompt for
|
||||
* password...
|
||||
*/
|
||||
|
||||
if ( focusWidget != passwd_text )
|
||||
return (VF_INVALID);
|
||||
|
||||
|
||||
/*
|
||||
* if maximum number of attempts exceeded, log failure...
|
||||
*/
|
||||
|
||||
if ((++login_attempts % MAXATTEMPTS) == 0 ) {
|
||||
|
||||
#ifdef peter
|
||||
syslog(LOG_CRIT,
|
||||
"REPEATED LOGIN FAILURES ON %s FROM %.*s, %.*s",
|
||||
"??", HMAX, host, NMAX, name);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* check status codes from verification...
|
||||
*/
|
||||
|
||||
switch (status.all) {
|
||||
|
||||
case login_$logins_disabled: /* logins are disabled */
|
||||
if (p->pw_uid != 0)
|
||||
return(VF_NO_LOGIN);
|
||||
else
|
||||
if (!CheckPassword(name,passwd))
|
||||
return(VF_INVALID);
|
||||
|
||||
break;
|
||||
|
||||
case login_$inv_acct: /* invalid account */
|
||||
if ( PasswordAged(p) )
|
||||
return(VF_PASSWD_AGED);
|
||||
else
|
||||
return(VF_INVALID);
|
||||
break;
|
||||
|
||||
default: /* other failed verification */
|
||||
return(VF_INVALID);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* verify home directory exists...
|
||||
*/
|
||||
|
||||
if (chdir(p->pw_dir) < 0) {
|
||||
if (chdir("/") < 0)
|
||||
return(VF_HOME);
|
||||
else
|
||||
LogError(ReadCatalog(
|
||||
MC_LOG_SET,MC_LOG_NO_HMDIR,MC_DEF_LOG_NO_HMDIR),
|
||||
p->pw_dir, name);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* validate uid and gid...
|
||||
*/
|
||||
|
||||
if ((p->pw_gid < 0) ||
|
||||
(setgid(p->pw_gid) == -1)) {
|
||||
return(VF_BAD_GID);
|
||||
}
|
||||
|
||||
if ((p->pw_uid < 0) ||
|
||||
(seteuid(p->pw_uid) == -1)) {
|
||||
return(VF_BAD_UID);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* verify ok...
|
||||
*/
|
||||
|
||||
return(VF_OK);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -64,7 +64,6 @@
|
||||
** Platform identification:
|
||||
**
|
||||
** __hpux HP-UX OS only
|
||||
** __apollo Domain OS only
|
||||
** sun SUN OS only
|
||||
** SVR4 SUN OS et al.
|
||||
** _AIX AIX only
|
||||
@@ -98,10 +97,7 @@
|
||||
/*
|
||||
* Define as generic those without platform specific code.
|
||||
*/
|
||||
#if !(defined(__hpux) || \
|
||||
defined(__apollo) || \
|
||||
defined(_AIX) || \
|
||||
defined(sun))
|
||||
#if !(defined(__hpux) || defined(_AIX) || defined(sun))
|
||||
#define generic
|
||||
#endif
|
||||
|
||||
@@ -694,7 +690,7 @@ CheckPassword( char *name, char *passwd, struct passwd **ppwd )
|
||||
|
||||
#ifdef __PASSWD_ETC
|
||||
/*
|
||||
* If regular passwd check fails, try old-style Apollo SR
|
||||
* If regular passwd check fails, try old-style SR
|
||||
*/
|
||||
|
||||
if (rgy_$is_des(passwd, strlen(passwd), p->pw_passwd) == TRUE)
|
||||
|
||||
@@ -1950,11 +1950,6 @@ if ( session_menu != NULL ) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __apollo
|
||||
/*
|
||||
* [ No Windows ] menu pane...
|
||||
*/
|
||||
@@ -1972,7 +1967,6 @@ if ( session_menu != NULL ) {
|
||||
if (getenv(LOCATION) == NULL || strcmp(getenv(LOCATION), "local") != 0 )
|
||||
XtSetSensitive(options_item[j], False);
|
||||
j++;
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user