From 6eea50f8cd745ed495c28b7d114f2f2f8b7d6651 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 2 May 1996 13:06:31 +0000 Subject: [PATCH] Add SI_SYSTEMINFO from Solaris-2.5 --- sys/compat/svr4/svr4_stat.c | 17 ++++++++++++++--- sys/compat/svr4/svr4_systeminfo.h | 5 ++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c index 0de41a326ec..c7dc4d870a7 100644 --- a/sys/compat/svr4/svr4_stat.c +++ b/sys/compat/svr4/svr4_stat.c @@ -1,5 +1,5 @@ -/* $OpenBSD: svr4_stat.c,v 1.7 1996/04/21 22:18:27 deraadt Exp $ */ -/* $NetBSD: svr4_stat.c,v 1.20 1996/04/11 12:46:41 christos Exp $ */ +/* $OpenBSD: svr4_stat.c,v 1.8 1996/05/02 13:06:33 deraadt Exp $ */ +/* $NetBSD: svr4_stat.c,v 1.21 1996/04/22 01:16:07 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -434,7 +434,7 @@ svr4_sys_systeminfo(p, v, retval) int error; long len; extern char ostype[], hostname[], osrelease[], - version[], machine[], domainname[]; + version[], machine[], domainname[], cpu_model[]; u_int rlen = SCARG(uap, len); @@ -475,6 +475,14 @@ svr4_sys_systeminfo(p, v, retval) str = domainname; break; + case SVR4_SI_PLATFORM: + str = cpu_model; + break; + + case SVR4_SI_KERB_REALM: + str = "unsupported"; + break; + case SVR4_SI_SET_HOSTNAME: if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) return error; @@ -487,6 +495,9 @@ svr4_sys_systeminfo(p, v, retval) name = KERN_DOMAINNAME; return kern_sysctl(&name, 1, 0, 0, SCARG(uap, buf), rlen, p); + case SVR4_SI_SET_KERB_REALM: + return 0; + default: DPRINTF(("Bad systeminfo command %d\n", SCARG(uap, what))); return ENOSYS; diff --git a/sys/compat/svr4/svr4_systeminfo.h b/sys/compat/svr4/svr4_systeminfo.h index aa51734f92a..bec9e463b96 100644 --- a/sys/compat/svr4/svr4_systeminfo.h +++ b/sys/compat/svr4/svr4_systeminfo.h @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_systeminfo.h,v 1.2 1994/11/18 02:54:18 christos Exp $ */ +/* $NetBSD: svr4_systeminfo.h,v 1.3 1996/04/22 01:16:04 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -41,5 +41,8 @@ #define SVR4_SI_SRPC_DOMAIN 9 #define SVR4_SI_SET_HOSTNAME 258 #define SVR4_SI_SET_SRPC_DOMAIN 265 +#define SVR4_SI_SET_KERB_REALM 266 +#define SVR4_SI_KERB_REALM 267 +#define SVR4_SI_PLATFORM 513 #endif /* !_SVR4_SYSTEMINFO_H_ */ -- 2.20.1