diff options
Diffstat (limited to 'usr/src/cmd')
-rw-r--r-- | usr/src/cmd/fs.d/ufs/quotaon/Makefile | 18 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/ufs/quotaon/ufs_quota | 44 | ||||
-rw-r--r-- | usr/src/cmd/initpkg/init.d/Makefile | 8 | ||||
-rw-r--r-- | usr/src/cmd/initpkg/init.d/devlinks | 38 | ||||
-rw-r--r-- | usr/src/cmd/initpkg/init.d/drvconfig | 36 | ||||
-rw-r--r-- | usr/src/cmd/initpkg/init.d/ldap.client | 50 | ||||
-rw-r--r-- | usr/src/cmd/initpkg/init.d/nfs.server | 45 | ||||
-rw-r--r-- | usr/src/cmd/initpkg/init.d/nscd | 48 | ||||
-rw-r--r-- | usr/src/cmd/initpkg/init.d/sendmail | 53 | ||||
-rw-r--r-- | usr/src/cmd/initpkg/init.d/slpd | 47 | ||||
-rw-r--r-- | usr/src/cmd/mdb/common/modules/smbsrv/smbsrv.c | 31 | ||||
-rw-r--r-- | usr/src/cmd/smbsrv/smbadm/smbadm.c | 8 | ||||
-rw-r--r-- | usr/src/cmd/smbsrv/smbd/server.xml | 7 | ||||
-rw-r--r-- | usr/src/cmd/smbsrv/smbd/smbd_main.c | 5 | ||||
-rw-r--r-- | usr/src/cmd/smbsrv/smbstat/smbstat.c | 10 |
15 files changed, 18 insertions, 430 deletions
diff --git a/usr/src/cmd/fs.d/ufs/quotaon/Makefile b/usr/src/cmd/fs.d/ufs/quotaon/Makefile index b53e3dd85a..40949dd5d9 100644 --- a/usr/src/cmd/fs.d/ufs/quotaon/Makefile +++ b/usr/src/cmd/fs.d/ufs/quotaon/Makefile @@ -20,6 +20,7 @@ # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# Copyright 2015 Nexenta Systems, Inc. All rights reserved. # # cmd/fs.d/ufs/quotaon/Makefile @@ -28,19 +29,9 @@ LIBPROG= quotaon QUOTAOFF= quotaoff ATTMK= $(LIBPROG) -# -# Note that no links are made from the rc[S0-3].d directories for this rc -# script. The normal way to ship this is completely disabled. The process -# for enabling this script is described in the "Routine System Administration -# Guide" (as of this time). -# -INIT_SCRIPT= ufs_quota -ROOTINIT_D= $(ROOTETC)/init.d -ROOTINIT_SCRIPT=$(ROOTINIT_D)/$(INIT_SCRIPT) - OTHERINSTALL= $(ROOTLIBFSTYPE)/$(QUOTAOFF) \ - $(ROOTUSRSBIN)/$(LIBPROG) $(ROOTUSRSBIN)/$(QUOTAOFF) \ - $(ROOTINIT_SCRIPT) + $(ROOTUSRSBIN)/$(LIBPROG) $(ROOTUSRSBIN)/$(QUOTAOFF) + LINKVALUEON= ../lib/fs/$(FSTYPE)/$(LIBPROG) LINKVALUEOFF= ../lib/fs/$(FSTYPE)/$(QUOTAOFF) @@ -62,6 +53,3 @@ $(ROOTUSRSBIN)/$(LIBPROG): $(ROOTUSRSBIN)/$(QUOTAOFF): -$(RM) $@; $(SYMLINK) $(LINKVALUEOFF) $@ - -$(ROOTINIT_D)/% : % - $(INS.file) diff --git a/usr/src/cmd/fs.d/ufs/quotaon/ufs_quota b/usr/src/cmd/fs.d/ufs/quotaon/ufs_quota deleted file mode 100644 index cf558d0d7b..0000000000 --- a/usr/src/cmd/fs.d/ufs/quotaon/ufs_quota +++ /dev/null @@ -1,44 +0,0 @@ -#!/sbin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 1993, 1997 by Sun Microsystems, Inc. -# All rights reserved. -# -#ident "%Z%%M% %I% %E% SMI" - -case "$1" in -'start') - /usr/sbin/quotacheck -a - /usr/sbin/quotaon -a - ;; - -'stop') - /usr/sbin/quotaoff -a - ;; - -*) - echo "Usage: $0 { start | stop }" - exit 1 - ;; -esac -exit 0 diff --git a/usr/src/cmd/initpkg/init.d/Makefile b/usr/src/cmd/initpkg/init.d/Makefile index 6eab9ec100..b8ef85b083 100644 --- a/usr/src/cmd/initpkg/init.d/Makefile +++ b/usr/src/cmd/initpkg/init.d/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2014 Garrett D'Amore <garrett@damore.org> +# Copyright 2015 Nexenta Systems, Inc. All rights reserved. # include ../../Makefile.cmd @@ -32,13 +33,6 @@ i386_PROG= PROG= \ README \ cachefs.daemon \ - devlinks \ - drvconfig \ - ldap.client \ - nfs.server \ - nscd \ - sendmail \ - slpd \ sysetup \ uucp \ $($(MACH)_PROG) diff --git a/usr/src/cmd/initpkg/init.d/devlinks b/usr/src/cmd/initpkg/init.d/devlinks deleted file mode 100644 index 4ec27a9be0..0000000000 --- a/usr/src/cmd/initpkg/init.d/devlinks +++ /dev/null @@ -1,38 +0,0 @@ -#!/sbin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T. -# All rights reserved. -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -if [ -n "$_INIT_RECONFIG" ]; then - echo 'Configuring the /dev directory' - - /usr/sbin/devlinks - /usr/sbin/disks - /usr/sbin/ports - /usr/sbin/tapes - /usr/sbin/audlinks -fi diff --git a/usr/src/cmd/initpkg/init.d/drvconfig b/usr/src/cmd/initpkg/init.d/drvconfig deleted file mode 100644 index 0f41b24c31..0000000000 --- a/usr/src/cmd/initpkg/init.d/drvconfig +++ /dev/null @@ -1,36 +0,0 @@ -#!/sbin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T. -# All rights reserved. -# -# -# Copyright (c) 1991-1997 by Sun Microsystems, Inc. -# All rights reserved. -# -#ident "%Z%%M% %I% %E% SMI" - -if [ -n "$_INIT_RECONFIG" ]; then - echo 'Configuring the /devices directory' - /usr/sbin/drvconfig -fi diff --git a/usr/src/cmd/initpkg/init.d/ldap.client b/usr/src/cmd/initpkg/init.d/ldap.client deleted file mode 100644 index 665e3b363f..0000000000 --- a/usr/src/cmd/initpkg/init.d/ldap.client +++ /dev/null @@ -1,50 +0,0 @@ -#!/sbin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" - -# This service is managed by smf(5). Thus, this script provides -# compatibility with previously documented init.d script behaviour. - -FMRI=network/ldap/client:default - -case "$1" in -'start') - [ -f /var/ldap/ldap_client_file ] && \ - [ -f /usr/lib/ldap/ldap_cachemgr ] || exit 0 - - /usr/sbin/svcadm enable -t $FMRI - ;; - -'stop') - /usr/sbin/svcadm disable -t $FMRI - ;; - -*) - echo "Usage: $0 { start | stop }" - exit 1 - ;; -esac diff --git a/usr/src/cmd/initpkg/init.d/nfs.server b/usr/src/cmd/initpkg/init.d/nfs.server deleted file mode 100644 index 4f60fc8f4b..0000000000 --- a/usr/src/cmd/initpkg/init.d/nfs.server +++ /dev/null @@ -1,45 +0,0 @@ -#!/sbin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" - -# This service is managed by smf(5). Thus, this script provides -# compatibility with previously documented init.d script behaviour. - -case "$1" in -'start') - svcadm enable -t network/nfs/server - ;; - -'stop') - svcadm disable -t network/nfs/server - ;; - -*) - echo "Usage: $0 { start | stop }" - exit 1 - ;; -esac diff --git a/usr/src/cmd/initpkg/init.d/nscd b/usr/src/cmd/initpkg/init.d/nscd deleted file mode 100644 index de78fe8812..0000000000 --- a/usr/src/cmd/initpkg/init.d/nscd +++ /dev/null @@ -1,48 +0,0 @@ -#!/sbin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" - -# This service is managed by smf(5). Thus, this script provides -# compatibility with previously documented init.d script behaviour. - -FMRI=system/name-service-cache:default - -case "$1" in -'start') - [ -f /etc/nscd.conf ] && [ -f /usr/sbin/nscd ] || exit 0 - /usr/sbin/svcadm enable -t $FMRI - ;; - -'stop') - [ -f /usr/sbin/nscd ] && /usr/sbin/svcadm disable -t $FMRI - ;; - -*) - echo "Usage: $0 { start | stop }" - exit 1 - ;; -esac diff --git a/usr/src/cmd/initpkg/init.d/sendmail b/usr/src/cmd/initpkg/init.d/sendmail deleted file mode 100644 index 896e9f9ea1..0000000000 --- a/usr/src/cmd/initpkg/init.d/sendmail +++ /dev/null @@ -1,53 +0,0 @@ -#!/sbin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# This service is managed by smf(5). Thus, this script provides -# compatibility with previously documented init.d script behaviour. - -case "$1" in -'restart') - # The previous init.d/sendmail restart behaviour matches - # the smf(5) 'refresh' semantics. - - svcadm refresh network/smtp:sendmail - svcadm refresh network/sendmail-client:default - ;; - -'start') - svcadm enable -t network/smtp:sendmail - svcadm enable -t network/sendmail-client:default - ;; - -'stop') - svcadm disable -t network/smtp:sendmail - svcadm disable -t network/sendmail-client:default - ;; - -*) - echo "Usage: $0 { start | stop | restart }" - exit 1 - ;; -esac diff --git a/usr/src/cmd/initpkg/init.d/slpd b/usr/src/cmd/initpkg/init.d/slpd deleted file mode 100644 index d5283fa7f9..0000000000 --- a/usr/src/cmd/initpkg/init.d/slpd +++ /dev/null @@ -1,47 +0,0 @@ -#!/sbin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" - -# This service is managed by smf(5). Thus, this script provides -# compatibility with previously documented init.d script behaviour. - -FMRI=network/slp:default - -case "$1" in -'start') - /usr/sbin/svcadm enable -t $FMRI - ;; - -'stop') - /usr/sbin/svcadm disable -t $FMRI - ;; - -*) - echo "Usage: $0 { start | stop }" - exit 1 - ;; -esac diff --git a/usr/src/cmd/mdb/common/modules/smbsrv/smbsrv.c b/usr/src/cmd/mdb/common/modules/smbsrv/smbsrv.c index eaa381cc47..1e51ea02f3 100644 --- a/usr/src/cmd/mdb/common/modules/smbsrv/smbsrv.c +++ b/usr/src/cmd/mdb/common/modules/smbsrv/smbsrv.c @@ -1347,12 +1347,12 @@ smb_kshare_cb(uintptr_t addr, const void *data, void *arg) * ::smbshares * * dcmd - Print out smb_kshare structures. + * requires addr of an smb_server_t */ /*ARGSUSED*/ static int smb_dcmd_kshare(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) { - GElf_Sym sym; uint_t opts = 0; if (mdb_getopts(argc, argv, @@ -1360,14 +1360,9 @@ smb_dcmd_kshare(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) NULL) != argc) return (DCMD_USAGE); - if (!(flags & DCMD_ADDRSPEC)) { - if (mdb_lookup_by_name("smb_export", &sym) == -1) { - mdb_warn("failed to find symbol smb_export"); - return (DCMD_ERR); - } - addr = (uintptr_t)sym.st_value + - OFFSETOF(smb_export_t, e_share_avl.avl_tree); - } + if (!(flags & DCMD_ADDRSPEC)) + return (DCMD_USAGE); + addr += OFFSETOF(smb_server_t, sv_export.e_share_avl.avl_tree); if (DCMD_HDRSPEC(flags)) { mdb_printf( @@ -1462,26 +1457,20 @@ smb_dcmd_vfs(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) } /* - * Initialize the smb_vfs_t walker by reading the value of smb_export - * in the kernel's symbol table. Only global walk supported. + * Initialize the smb_vfs_t walker to point to the smb_export + * in the specified smb_server_t instance. (no global walks) */ static int smb_vfs_walk_init(mdb_walk_state_t *wsp) { - GElf_Sym sym; - - if (wsp->walk_addr != NULL) { - mdb_printf("smb_vfs walk only supports global walks\n"); - return (WALK_ERR); - } - if (mdb_lookup_by_name("smb_export", &sym) == -1) { - mdb_warn("failed to find 'smb_export'"); + if (wsp->walk_addr == NULL) { + mdb_printf("require address of an smb_server_t\n"); return (WALK_ERR); } - wsp->walk_addr = (uintptr_t)sym.st_value + - offsetof(smb_export_t, e_vfs_list) + offsetof(smb_llist_t, ll_list); + wsp->walk_addr += + OFFSETOF(smb_server_t, sv_export.e_vfs_list.ll_list); if (mdb_layered_walk("list", wsp) == -1) { mdb_warn("failed to walk list of VFS"); diff --git a/usr/src/cmd/smbsrv/smbadm/smbadm.c b/usr/src/cmd/smbsrv/smbadm/smbadm.c index 07887fa7a3..36e3efa781 100644 --- a/usr/src/cmd/smbsrv/smbadm/smbadm.c +++ b/usr/src/cmd/smbsrv/smbadm/smbadm.c @@ -1467,16 +1467,10 @@ main(int argc, char **argv) progname = basename(argv[0]); - if (getzoneid() != GLOBAL_ZONEID) { - (void) fprintf(stderr, - gettext("cannot execute in non-global zone\n")); - return (0); - } - if (is_system_labeled()) { (void) fprintf(stderr, gettext("Trusted Extensions not supported\n")); - return (0); + return (1); } if (argc < 2) { diff --git a/usr/src/cmd/smbsrv/smbd/server.xml b/usr/src/cmd/smbsrv/smbd/server.xml index cf5e69986e..6b83e73762 100644 --- a/usr/src/cmd/smbsrv/smbd/server.xml +++ b/usr/src/cmd/smbsrv/smbd/server.xml @@ -96,12 +96,7 @@ file. name='start' exec='/usr/lib/smbsrv/smbd %m' timeout_seconds='60' > - <method_context> - <method_credential - user='root' - group='sys' - privileges='all' /> - </method_context> + <!-- XXX: need method_context? --> </exec_method> <exec_method diff --git a/usr/src/cmd/smbsrv/smbd/smbd_main.c b/usr/src/cmd/smbsrv/smbd/smbd_main.c index ef1f887a51..827f44580f 100644 --- a/usr/src/cmd/smbsrv/smbd/smbd_main.c +++ b/usr/src/cmd/smbsrv/smbd/smbd_main.c @@ -131,11 +131,6 @@ main(int argc, char *argv[]) return (SMF_EXIT_ERR_FATAL); } - if (getzoneid() != GLOBAL_ZONEID) { - smbd_report("non-global zones are not supported"); - return (SMF_EXIT_ERR_FATAL); - } - if (is_system_labeled()) { smbd_report("Trusted Extensions not supported"); return (SMF_EXIT_ERR_FATAL); diff --git a/usr/src/cmd/smbsrv/smbstat/smbstat.c b/usr/src/cmd/smbsrv/smbstat/smbstat.c index de3773d247..1cc91b7232 100644 --- a/usr/src/cmd/smbsrv/smbstat/smbstat.c +++ b/usr/src/cmd/smbsrv/smbstat/smbstat.c @@ -20,6 +20,7 @@ */ /* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -307,18 +308,11 @@ main(int argc, char *argv[]) (void) setlocale(LC_ALL, ""); (void) textdomain(TEXT_DOMAIN); - if (getzoneid() != GLOBAL_ZONEID) { - (void) fprintf(stderr, - gettext("%s: Cannot execute in non-global zone.\n"), - argv[0]); - return (0); - } - if (is_system_labeled()) { (void) fprintf(stderr, gettext("%s: Trusted Extensions not supported.\n"), argv[0]); - return (0); + return (1); } while ((c = getopt(argc, argv, "achnrtuz")) != EOF) { |