-/*
- * XXX: license?
- */
-
-/*
- * The modules contains code to support cray t3e and sv1 computers.
- * It is here to minimize the modifcations to the openssh base code.
+/*
+ * $Id$
+ *
+ * bsd-cray.c
+ *
+ * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
+ * Significant portions provided by
+ * Wayne Schroeder, SDSC <schroeder@sdsc.edu>
+ * William Jones, UTexas <jones@tacc.utexas.edu>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Created: Apr 22 16.34:00 2002 wp
+ *
+ * This file contains functions required for proper execution
+ * on UNICOS systems.
+ *
*/
#ifdef _CRAY
-
#include <udb.h>
#include <tmpdir.h>
#include <unistd.h>
* Functions.
*/
void cray_retain_utmp(struct utmp *, int);
-void cray_create_tmpdir(int, uid_t, gid_t);
-void cray_delete_tmpdir(char *, int , uid_t);
-void cray_job_termination_handler (int);
+void cray_delete_tmpdir(char *, int, uid_t);
void cray_init_job(struct passwd *);
void cray_set_tmpdir(struct utmp *);
if (p == NULL)
fatal("No UDB entry for %.100s", username);
if (uid != p->ue_uid)
- fatal("UDB etnry %.100s uid(%d) does not match uid %d",
- username, p->ue_uid, uid);
+ fatal("UDB entry %.100s uid(%d) does not match uid %d",
+ username, (int) p->ue_uid, (int) uid);
for (j = 0; p->ue_acids[j] != -1 && j < MAXVIDS; j++) {
accts[naccts] = p->ue_acids[j];
naccts++;
memset(&usrv, 0, sizeof(usrv));
if (setusrv(&usrv) < 0)
- fatal("%s(%d): setusrv(): %s\n", __FILE__, __LINE__,
+ fatal("%s(%d): setusrv(): %s", __FILE__, __LINE__,
strerror(errno));
if ((privstate = priv_init_proc()) != NULL) {
result = priv_set_proc(privstate);
if (result != 0 )
- fatal("%s(%d): priv_set_proc(): %s\n",
+ fatal("%s(%d): priv_set_proc(): %s",
__FILE__, __LINE__, strerror(errno));
priv_free_proc(privstate);
}
return;
if ((child = fork()) == 0) {
- execl(CLEANTMPCMD, CLEANTMPCMD, login, jtmp, 0);
+ execl(CLEANTMPCMD, CLEANTMPCMD, login, jtmp, (char *)NULL);
fatal("cray_delete_tmpdir: execl of CLEANTMPCMD failed");
}