summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraf <none@none>2006-10-13 20:48:34 -0700
committerraf <none@none>2006-10-13 20:48:34 -0700
commit06e1a7147edd272b7296f208141627a5b1191731 (patch)
treee3034f874727d3818a64b88169f71eb9371628b6
parent9de6b717b8109b1c5d038a3afb9ff82efd328d25 (diff)
downloadillumos-gate-06e1a7147edd272b7296f208141627a5b1191731.tar.gz
PSARC 2006/561 libcmd must die
6480998 libcmd must die --HG-- rename : usr/src/lib/libcmd/common/deflt.c => usr/src/lib/libc/port/gen/deflt.c
-rw-r--r--usr/src/Makefile.lint1
-rw-r--r--usr/src/Targetdirs17
-rw-r--r--usr/src/cmd/auths/Makefile12
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/Makefile3
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/finger.c10
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile9
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile8
-rw-r--r--usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile9
-rw-r--r--usr/src/cmd/cmd-inet/usr.sbin/Makefile3
-rw-r--r--usr/src/cmd/cmd-inet/usr.sbin/ifconfig/Makefile2
-rw-r--r--usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c13
-rw-r--r--usr/src/cmd/cron/Makefile2
-rw-r--r--usr/src/cmd/devfsadm/Makefile.com3
-rw-r--r--usr/src/cmd/fs.d/Makefile3
-rw-r--r--usr/src/cmd/fs.d/autofs/Makefile5
-rw-r--r--usr/src/cmd/fs.d/nfs/mount/Makefile9
-rw-r--r--usr/src/cmd/fs.d/nfs/mountd/Makefile3
-rw-r--r--usr/src/cmd/fs.d/nfs/nfsd/Makefile2
-rw-r--r--usr/src/cmd/fs.d/nfs/nfslog/Makefile13
-rw-r--r--usr/src/cmd/kbd/Makefile10
-rw-r--r--usr/src/cmd/keyserv/Makefile9
-rw-r--r--usr/src/cmd/keyserv/keyserv.c3
-rw-r--r--usr/src/cmd/login/Makefile13
-rw-r--r--usr/src/cmd/lp/cmd/lpsched/Makefile8
-rw-r--r--usr/src/cmd/mkpwdict/Makefile9
-rw-r--r--usr/src/cmd/pfexec/Makefile11
-rw-r--r--usr/src/cmd/power/Makefile10
-rw-r--r--usr/src/cmd/profiles/Makefile10
-rw-r--r--usr/src/cmd/rcm_daemon/Makefile.com2
-rw-r--r--usr/src/cmd/savecore/Makefile.com1
-rw-r--r--usr/src/cmd/ssh/sshd/Makefile9
-rw-r--r--usr/src/cmd/su/Makefile6
-rw-r--r--usr/src/cmd/sulogin/Makefile9
-rw-r--r--usr/src/cmd/tar/Makefile6
-rw-r--r--usr/src/cmd/utmpd/Makefile10
-rw-r--r--usr/src/cmd/ypcmd/yppasswd/Makefile9
-rw-r--r--usr/src/lib/Makefile6
-rw-r--r--usr/src/lib/common/inc/c_synonyms.h3
-rw-r--r--usr/src/lib/libc/amd64/Makefile1
-rw-r--r--usr/src/lib/libc/i386/Makefile.com1
-rw-r--r--usr/src/lib/libc/inc/synonyms.h3
-rw-r--r--usr/src/lib/libc/inc/tsd.h2
-rw-r--r--usr/src/lib/libc/port/gen/deflt.c (renamed from usr/src/lib/libcmd/common/deflt.c)93
-rw-r--r--usr/src/lib/libc/port/gen/getgrnam_r.c23
-rw-r--r--usr/src/lib/libc/port/gen/localtime.c113
-rw-r--r--usr/src/lib/libc/port/llib-lc1
-rw-r--r--usr/src/lib/libc/port/mapfile-vers6
-rw-r--r--usr/src/lib/libc/sparc/Makefile1
-rw-r--r--usr/src/lib/libc/sparcv9/Makefile1
-rw-r--r--usr/src/lib/libcmd/Makefile.com7
-rw-r--r--usr/src/lib/libcmd/common/llib-lcmd15
-rw-r--r--usr/src/lib/libcmd/common/mapfile-vers6
-rw-r--r--usr/src/lib/libcmd/common/placeholder.c40
-rw-r--r--usr/src/lib/libgss/Makefile.com2
-rw-r--r--usr/src/lib/libmapid/Makefile.com2
-rw-r--r--usr/src/lib/libnisdb/Makefile2
-rw-r--r--usr/src/lib/libpam/Makefile.com2
-rw-r--r--usr/src/lib/libsecdb/Makefile.com2
-rw-r--r--usr/src/lib/pam_modules/authtok_check/Makefile.com12
-rw-r--r--usr/src/lib/pam_modules/unix_account/Makefile.com9
-rw-r--r--usr/src/lib/pam_modules/unix_auth/Makefile.com12
-rw-r--r--usr/src/lib/pam_modules/unix_cred/Makefile.com9
-rw-r--r--usr/src/lib/passwdutil/Makefile.com2
-rw-r--r--usr/src/pkgdefs/SUNWarc/prototype_com4
-rw-r--r--usr/src/pkgdefs/SUNWarc/prototype_i3862
-rw-r--r--usr/src/pkgdefs/SUNWarc/prototype_sparc2
-rw-r--r--usr/src/pkgdefs/SUNWarcr/prototype_com2
-rw-r--r--usr/src/pkgdefs/SUNWarcr/prototype_i3861
-rw-r--r--usr/src/pkgdefs/SUNWarcr/prototype_sparc1
-rw-r--r--usr/src/pkgdefs/SUNWcsl/prototype_com4
-rw-r--r--usr/src/pkgdefs/SUNWcsl/prototype_i3864
-rw-r--r--usr/src/pkgdefs/SUNWcsl/prototype_sparc4
-rw-r--r--usr/src/pkgdefs/SUNWcslr/prototype_com2
-rw-r--r--usr/src/pkgdefs/SUNWcslr/prototype_i3862
-rw-r--r--usr/src/pkgdefs/SUNWcslr/prototype_sparc2
-rw-r--r--usr/src/tools/scripts/bfu.sh12
76 files changed, 310 insertions, 370 deletions
diff --git a/usr/src/Makefile.lint b/usr/src/Makefile.lint
index 933f602643..1743cfebc3 100644
--- a/usr/src/Makefile.lint
+++ b/usr/src/Makefile.lint
@@ -303,6 +303,7 @@ COMMON_SUBDIRS = \
lib/libc \
lib/libc_db \
lib/libcfgadm \
+ lib/libcmd \
lib/libcmdutils \
lib/libcontract \
lib/libcryptoutil \
diff --git a/usr/src/Targetdirs b/usr/src/Targetdirs
index 4e5f2c9ab9..3e48489d6b 100644
--- a/usr/src/Targetdirs
+++ b/usr/src/Targetdirs
@@ -822,8 +822,6 @@ $(ROOT)/usr/lib/libc.so.1:= REALPATH=../../lib/libc.so.1
$(ROOT)/usr/lib/libc.so:= REALPATH=../../lib/libc.so.1
$(ROOT)/usr/lib/libc_db.so.1:= REALPATH=../../lib/libc_db.so.1
$(ROOT)/usr/lib/libc_db.so:= REALPATH=../../lib/libc_db.so.1
-$(ROOT)/usr/lib/libcmd.so.1:= REALPATH=../../lib/libcmd.so.1
-$(ROOT)/usr/lib/libcmd.so:= REALPATH=../../lib/libcmd.so.1
$(ROOT)/usr/lib/libcmdutils.so.1:= REALPATH=../../lib/libcmdutils.so.1
$(ROOT)/usr/lib/libcmdutils.so:= REALPATH=../../lib/libcmdutils.so.1
$(ROOT)/usr/lib/libcontract.so.1:= REALPATH=../../lib/libcontract.so.1
@@ -940,8 +938,6 @@ $(ROOT)/usr/lib/llib-lbsm.ln:= REALPATH=../../lib/llib-lbsm.ln
$(ROOT)/usr/lib/llib-lbsm:= REALPATH=../../lib/llib-lbsm
$(ROOT)/usr/lib/llib-lc.ln:= REALPATH=../../lib/llib-lc.ln
$(ROOT)/usr/lib/llib-lc:= REALPATH=../../lib/llib-lc
-$(ROOT)/usr/lib/llib-lcmd.ln:= REALPATH=../../lib/llib-lcmd.ln
-$(ROOT)/usr/lib/llib-lcmd:= REALPATH=../../lib/llib-lcmd
$(ROOT)/usr/lib/llib-lcmdutils.ln:= REALPATH=../../lib/llib-lcmdutils.ln
$(ROOT)/usr/lib/llib-lcmdutils:= REALPATH=../../lib/llib-lcmdutils
$(ROOT)/usr/lib/llib-lcontract.ln:= REALPATH=../../lib/llib-lcontract.ln
@@ -1073,10 +1069,6 @@ $(ROOT)/usr/lib/$(MACH64)/libc_db.so.1:= \
REALPATH=../../../lib/$(MACH64)/libc_db.so.1
$(ROOT)/usr/lib/$(MACH64)/libc_db.so:= \
REALPATH=../../../lib/$(MACH64)/libc_db.so.1
-$(ROOT)/usr/lib/$(MACH64)/libcmd.so.1:= \
- REALPATH=../../../lib/$(MACH64)/libcmd.so.1
-$(ROOT)/usr/lib/$(MACH64)/libcmd.so:= \
- REALPATH=../../../lib/$(MACH64)/libcmd.so.1
$(ROOT)/usr/lib/$(MACH64)/libcmdutils.so.1:= \
REALPATH=../../../lib/$(MACH64)/libcmdutils.so.1
$(ROOT)/usr/lib/$(MACH64)/libcmdutils.so:= \
@@ -1279,8 +1271,6 @@ $(ROOT)/usr/lib/$(MACH64)/llib-lbsm.ln:= \
REALPATH=../../../lib/$(MACH64)/llib-lbsm.ln
$(ROOT)/usr/lib/$(MACH64)/llib-lc.ln:= \
REALPATH=../../../lib/$(MACH64)/llib-lc.ln
-$(ROOT)/usr/lib/$(MACH64)/llib-lcmd.ln:= \
- REALPATH=../../../lib/$(MACH64)/llib-lcmd.ln
$(ROOT)/usr/lib/$(MACH64)/llib-lcmdutils.ln:= \
REALPATH=../../../lib/$(MACH64)/llib-lcmdutils.ln
$(ROOT)/usr/lib/$(MACH64)/llib-lcontract.ln:= \
@@ -1410,8 +1400,6 @@ SYM.USRLIB= \
/usr/lib/libc.so.1 \
/usr/lib/libc_db.so \
/usr/lib/libc_db.so.1 \
- /usr/lib/libcmd.so \
- /usr/lib/libcmd.so.1 \
/usr/lib/libcmdutils.so \
/usr/lib/libcmdutils.so.1 \
/usr/lib/libcontract.so \
@@ -1528,8 +1516,6 @@ SYM.USRLIB= \
/usr/lib/llib-lbsm.ln \
/usr/lib/llib-lc \
/usr/lib/llib-lc.ln \
- /usr/lib/llib-lcmd \
- /usr/lib/llib-lcmd.ln \
/usr/lib/llib-lcmdutils \
/usr/lib/llib-lcmdutils.ln \
/usr/lib/llib-lcontract \
@@ -1654,8 +1640,6 @@ SYM.USRLIB64= \
/usr/lib/$(MACH64)/libc.so.1 \
/usr/lib/$(MACH64)/libc_db.so \
/usr/lib/$(MACH64)/libc_db.so.1 \
- /usr/lib/$(MACH64)/libcmd.so \
- /usr/lib/$(MACH64)/libcmd.so.1 \
/usr/lib/$(MACH64)/libcmdutils.so \
/usr/lib/$(MACH64)/libcmdutils.so.1 \
/usr/lib/$(MACH64)/libcontract.so \
@@ -1757,7 +1741,6 @@ SYM.USRLIB64= \
/usr/lib/$(MACH64)/llib-lavl.ln \
/usr/lib/$(MACH64)/llib-lbsm.ln \
/usr/lib/$(MACH64)/llib-lc.ln \
- /usr/lib/$(MACH64)/llib-lcmd.ln \
/usr/lib/$(MACH64)/llib-lcmdutils.ln \
/usr/lib/$(MACH64)/llib-lcontract.ln \
/usr/lib/$(MACH64)/llib-lctf.ln \
diff --git a/usr/src/cmd/auths/Makefile b/usr/src/cmd/auths/Makefile
index a716337269..131eee0687 100644
--- a/usr/src/cmd/auths/Makefile
+++ b/usr/src/cmd/auths/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,9 +19,10 @@
# CDDL HEADER END
#
#
-# Copyright (c) 1999 by Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
+# ident "%Z%%M% %I% %E% SMI"
#
PROG= auths
@@ -36,7 +36,7 @@ ROOTBINAUTHS = $(AUTHS:%=$(ROOTBIN)/%)
.KEEP_STATE:
CPPFLAGS += -D_REENTRANT
-LDLIBS += -lsecdb -lcmd
+LDLIBS += -lsecdb
all: $(PROG)
diff --git a/usr/src/cmd/cmd-inet/usr.bin/Makefile b/usr/src/cmd/cmd-inet/usr.bin/Makefile
index aa203a2216..1f418ae70a 100644
--- a/usr/src/cmd/cmd-inet/usr.bin/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.bin/Makefile
@@ -18,6 +18,7 @@
#
# CDDL HEADER END
#
+#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -75,7 +76,7 @@ finger := CFLAGS += $(CCVERBOSE)
# Enable large file support for reading the lastlog file.
finger := CPPFLAGS += -D_FILE_OFFSET_BITS=64
-finger := LDLIBS += -lnsl -lcurses -lcmd -lsocket
+finger := LDLIBS += -lnsl -lcurses -lsocket
rcp lint-rcp := LDLIBS += -lsocket -lsec -lsendfile
rdate lint-rdate:= LDLIBS += -lsocket
rlogin lint-rlogin := LDLIBS += -lnsl -lsocket
diff --git a/usr/src/cmd/cmd-inet/usr.bin/finger.c b/usr/src/cmd/cmd-inet/usr.bin/finger.c
index 0e8cd23a66..1fe31a7573 100644
--- a/usr/src/cmd/cmd-inet/usr.bin/finger.c
+++ b/usr/src/cmd/cmd-inet/usr.bin/finger.c
@@ -2,9 +2,8 @@
* 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.
+ * 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.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -1456,7 +1456,7 @@ initscreening(void)
*/
flags = defcntl(DC_GETFLAGS, 0);
TURNOFF(flags, DC_CASE);
- defcntl(DC_SETFLAGS, flags);
+ (void) defcntl(DC_SETFLAGS, flags);
if (cp = defread(passvar)) {
options = cp;
diff --git a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile
index e4c0460476..d7db17d316 100644
--- a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -42,7 +41,7 @@ CPPFLAGS += -D_FILE_OFFSET_BITS=64 \
-I$(SRC)/lib/gss_mechs/mech_krb5/include \
-I$(SRC)/uts/common/gssapi/mechs/krb5/include
-LDLIBS += -lsocket -lnsl -lcmd -lgss
+LDLIBS += -lsocket -lnsl -lgss
LDFLAGS += $(ZLAZYLOAD)
.KEEP_STATE:
diff --git a/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile b/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile
index fa24253112..85bc6e1376 100644
--- a/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile
@@ -17,15 +17,13 @@
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
-
-
#
#
-#ident "%Z%%M% %I% %E% SMI"
-#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# ident "%Z%%M% %I% %E% SMI"
+#
# Copyright (c) 1990 Mentat Inc.
#
# cmd/cmd-inet/usr.bin/netstat/Makefile
@@ -46,7 +44,7 @@ SRCS= $(LOCALSRCS) $(COMMONSRCS)
CPPFLAGS += -DNDEBUG -I$(CMDINETCOMMONDIR)
LAZYLIBS = $(ZLAZYLOAD) -ltsnet -ltsol $(ZNOLAZYLOAD)
lint := LAZYLIBS = -ltsnet -ltsol
-LDLIBS += -ldhcpagent -lcmd -lsocket -lnsl -lkstat $(LAZYLIBS)
+LDLIBS += -ldhcpagent -lsocket -lnsl -lkstat $(LAZYLIBS)
.KEEP_STATE:
diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile
index b3240595af..b92d2782ba 100644
--- a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -42,7 +41,7 @@ POFILES = $(SRCS:%.c=%.po)
# via UNIX98; enable the appropriate #defines for UNIX98.
#
CPPFLAGS += -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -I$(SRC)/cmd/cmd-inet/common
-LDLIBS += -lcmd -lsocket -lnsl -lsysevent -lnvpair -lipmp -lc
+LDLIBS += -lsocket -lnsl -lsysevent -lnvpair -lipmp -lc
LINTFLAGS += -erroff=E_FUNC_DECL_VAR_ARG2 -erroff=E_INCONS_VAL_TYPE_DECL2 \
-erroff=E_FUNC_USED_VAR_ARG2 -erroff=E_INCONS_ARG_DECL2 \
diff --git a/usr/src/cmd/cmd-inet/usr.sbin/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/Makefile
index 696a3a6df7..7ccfbed9aa 100644
--- a/usr/src/cmd/cmd-inet/usr.sbin/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.sbin/Makefile
@@ -17,8 +17,6 @@
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
-
-
#
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
@@ -139,7 +137,6 @@ $(NSLPROG) := LDLIBS += -lnsl
$(AUDITPROG) := LDLIBS += -lbsm
$(PAMPROG) := LDLIBS += -lpam
$(RPCSVCPROG) := LDLIBS += -lrpcsvc
-$(CMDPROG) := LDLIBS += -lcmd
$(K5PROGS) := LDFLAGS += $(ZLAZYLOAD) $(KRUNPATH) \
-L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
$(K5PROGS) := K5LIBS= -lmech_krb5
diff --git a/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/Makefile
index a008c55ac1..3011207150 100644
--- a/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/Makefile
@@ -39,7 +39,7 @@ COMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:%.o=%.c)
SRCS= $(LOCALSRCS) $(COMMONSRCS)
CPPFLAGS += -I$(CMDINETCOMMONDIR) -I$(SRC)/common/net/dhcp
-LDLIBS += -lcmd -ldevinfo -ldhcpagent -linetcfg -ldlpi
+LDLIBS += -ldevinfo -ldhcpagent -linetcfg -ldlpi
LINTFLAGS += -m
ROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
diff --git a/usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c b/usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
index 46d76888ec..bb6c73c548 100644
--- a/usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
+++ b/usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
@@ -2,9 +2,8 @@
* 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.
+ * 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.
@@ -18,8 +17,10 @@
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
- *
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ */
+
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -4746,7 +4747,7 @@ showbanner(void)
/* ignore case */
flags = defcntl(DC_GETFLAGS, 0);
TURNOFF(flags, DC_CASE);
- defcntl(DC_SETFLAGS, flags);
+ (void) defcntl(DC_SETFLAGS, flags);
if (cp = defread(bannervar)) {
FILE *fp;
diff --git a/usr/src/cmd/cron/Makefile b/usr/src/cmd/cron/Makefile
index f449b98220..12970e35d0 100644
--- a/usr/src/cmd/cron/Makefile
+++ b/usr/src/cmd/cron/Makefile
@@ -141,7 +141,7 @@ at := LDLIBS += -lproject -lsecdb
at.xpg4 := LDLIBS += -lproject -lsecdb
atq := LDLIBS += -lsecdb
atrm := LDLIBS += -lsecdb
-cron := LDLIBS += -lcmd -lpam -lproject -lcontract
+cron := LDLIBS += -lpam -lproject -lcontract
crontab := LDLIBS += -lsecdb -lpam
crontab.xpg6 := LDLIBS += -lsecdb -lpam
crontab.xpg4 := LDLIBS += -lsecdb -lpam
diff --git a/usr/src/cmd/devfsadm/Makefile.com b/usr/src/cmd/devfsadm/Makefile.com
index 972f4e985c..8037e617dc 100644
--- a/usr/src/cmd/devfsadm/Makefile.com
+++ b/usr/src/cmd/devfsadm/Makefile.com
@@ -18,7 +18,6 @@
#
# CDDL HEADER END
#
-
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -124,7 +123,7 @@ LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
LAZYLIBS = $(ZLAZYLOAD) -lzonecfg -lbrand -lbsm $(ZNOLAZYLOAD)
lint := LAZYLIBS = -lzonecfg -lbrand -lbsm
-LDLIBS += -ldevinfo -lgen -lsysevent -lnvpair -lcmd -ldoor $(LAZYLIBS) -lnsl
+LDLIBS += -ldevinfo -lgen -lsysevent -lnvpair -ldoor $(LAZYLIBS) -lnsl
SRCS = $(DEVFSADM_SRC) $(LINK_SRCS)
OBJS = $(DEVFSADM_OBJ) $(LINK_OBJS)
diff --git a/usr/src/cmd/fs.d/Makefile b/usr/src/cmd/fs.d/Makefile
index eb78c8d14e..d14b141a07 100644
--- a/usr/src/cmd/fs.d/Makefile
+++ b/usr/src/cmd/fs.d/Makefile
@@ -88,8 +88,7 @@ df.o := CFLAGS += $(iBCS2FLAG)
CPPFLAGS += -D_LARGEFILE64_SOURCE
%.xpg4.o := CPPFLAGS += -DXPG4
-$(XPG4) df ff fsck mount volcopy := LDLIBS += -lcmd
-$(SPPROG) := LDLIBS += -lcmd -lkstat
+$(SPPROG) := LDLIBS += -lkstat
$(ROOTETCMNTTAB) := FILEMODE = 444
$(ROOTETCMNTTAB) := OWNER = root
diff --git a/usr/src/cmd/fs.d/autofs/Makefile b/usr/src/cmd/fs.d/autofs/Makefile
index ef869ee615..47fb37668e 100644
--- a/usr/src/cmd/fs.d/autofs/Makefile
+++ b/usr/src/cmd/fs.d/autofs/Makefile
@@ -85,10 +85,9 @@ POFILE= autofs.po
GREP= egrep
SED= sed
-$(AUTO) := LDLIBS += -lnsl -lsldap -lcmd
+$(AUTO) := LDLIBS += -lnsl -lsldap
$(MOUNT):= LDLIBS += -lnsl
-$(TYPEPROG) := LDLIBS += -lrpcsvc -lsocket -lnsl -lsldap -lcmd \
- -lkstat
+$(TYPEPROG) := LDLIBS += -lrpcsvc -lsocket -lnsl -lsldap -lkstat
$(TYPEPROG) := LDFLAGS += -R/usr/lib/fs/$(FSTYPE)
CFLAGS += $(CCVERBOSE) -D_FILE_OFFSET_BITS=64
diff --git a/usr/src/cmd/fs.d/nfs/mount/Makefile b/usr/src/cmd/fs.d/nfs/mount/Makefile
index b1287a27a9..c9419f823d 100644
--- a/usr/src/cmd/fs.d/nfs/mount/Makefile
+++ b/usr/src/cmd/fs.d/nfs/mount/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -51,7 +50,7 @@ UNCHECKED_HDRS= webnfs.h
#
POFILE= mount.po
-LDLIBS += -lrpcsvc -lnsl -lsocket -lcmd
+LDLIBS += -lrpcsvc -lnsl -lsocket
CPPFLAGS += -I. -I../.. -I../lib
CFLAGS += $(CCVERBOSE)
diff --git a/usr/src/cmd/fs.d/nfs/mountd/Makefile b/usr/src/cmd/fs.d/nfs/mountd/Makefile
index 97a7153cc5..ce74236d54 100644
--- a/usr/src/cmd/fs.d/nfs/mountd/Makefile
+++ b/usr/src/cmd/fs.d/nfs/mountd/Makefile
@@ -24,6 +24,7 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
+
FSTYPE = nfs
TYPEPROG = mountd
ATTMK = $(TYPEPROG)
@@ -35,7 +36,7 @@ LOCAL = mountd.o netgroup.o rmtab.o nfsauth.o \
nfsauth_xdr.o exportlist.o hashset.o
OBJS = $(LOCAL) $(COMMON)
SRCS = $(LOCAL:%.o=%.c) $(FSLIBSRC) ../lib/nfs_sec.c ../lib/sharetab.c
-LDLIBS += -lrpcsvc -lnsl -lbsm -lsocket -lcmd -ldoor
+LDLIBS += -lrpcsvc -lnsl -lbsm -lsocket -ldoor
CPPFLAGS += -D_REENTRANT
$(TYPEPROG): $(OBJS)
diff --git a/usr/src/cmd/fs.d/nfs/nfsd/Makefile b/usr/src/cmd/fs.d/nfs/nfsd/Makefile
index 1061f6d286..b8390cb9eb 100644
--- a/usr/src/cmd/fs.d/nfs/nfsd/Makefile
+++ b/usr/src/cmd/fs.d/nfs/nfsd/Makefile
@@ -31,7 +31,7 @@ ATTMK= $(TYPEPROG)
include ../../Makefile.fstype
-LDLIBS += -lnsl -lcmd -lnvpair
+LDLIBS += -lnsl -lnvpair
LOCAL= nfsd.o
OBJS= $(LOCAL) nfs_tbind.o thrpool.o
diff --git a/usr/src/cmd/fs.d/nfs/nfslog/Makefile b/usr/src/cmd/fs.d/nfs/nfslog/Makefile
index 54178a0000..c8d5ec9127 100644
--- a/usr/src/cmd/fs.d/nfs/nfslog/Makefile
+++ b/usr/src/cmd/fs.d/nfs/nfslog/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,11 +19,11 @@
# CDDL HEADER END
#
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# ident "%Z%%M% %I% %E% SMI"
+#
# cmd/fs.d/nfs/nfslog/Makefile
FSTYPE= nfs
@@ -40,7 +39,7 @@ LOCAL= process_buffer.o fhtab.o nfslogd.o nfslog_elf.o \
nfs_log_xdr.o buffer_list.o
OBJS= $(LOCAL) $(COMMON)
SRCS= $(LOCAL:%.o=%.c) $(COMMON:%.o=../lib/%.c)
-LDLIBS += -lsocket -lnsl -lcmd
+LDLIBS += -lsocket -lnsl
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_FILE_OFFSET_BITS=64
diff --git a/usr/src/cmd/kbd/Makefile b/usr/src/cmd/kbd/Makefile
index c4aab529d3..2457008098 100644
--- a/usr/src/cmd/kbd/Makefile
+++ b/usr/src/cmd/kbd/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,10 +19,10 @@
# CDDL HEADER END
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
+# ident "%Z%%M% %I% %E% SMI"
#
MANIFEST = keymap.xml
@@ -38,7 +37,6 @@ ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
PROG = kbd
CFLAGS += $(CCVERBOSE)
-LDLIBS += -lcmd
$(ROOTMANIFEST) := FILEMODE = 0444
diff --git a/usr/src/cmd/keyserv/Makefile b/usr/src/cmd/keyserv/Makefile
index 1507674b69..5dddafd644 100644
--- a/usr/src/cmd/keyserv/Makefile
+++ b/usr/src/cmd/keyserv/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -83,7 +82,7 @@ CPPFLAGS += -I. -I$(SRC)/lib/libnsl/include -I$(SRC)/lib/libsldap/common \
LDLIBS += -lnsl
chkey := LDLIBS += -lsldap
-keyserv := LDLIBS += -lmp -lcmd
+keyserv := LDLIBS += -lmp
newkey := LDLIBS += -lsldap -lsocket
.KEEP_STATE:
diff --git a/usr/src/cmd/keyserv/keyserv.c b/usr/src/cmd/keyserv/keyserv.c
index a998b605aa..1bcd917864 100644
--- a/usr/src/cmd/keyserv/keyserv.c
+++ b/usr/src/cmd/keyserv/keyserv.c
@@ -18,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -1401,7 +1402,7 @@ defaults(void)
*/
flags = defcntl(DC_GETFLAGS, 0);
TURNOFF(flags, DC_CASE);
- defcntl(DC_SETFLAGS, flags);
+ (void) defcntl(DC_SETFLAGS, flags);
if ((ptr = defread("ENABLE_NOBODY_KEYS=")) != NULL) {
if (strcasecmp(ptr, "NO") == 0) {
diff --git a/usr/src/cmd/login/Makefile b/usr/src/cmd/login/Makefile
index 22b7c9a796..a56995a813 100644
--- a/usr/src/cmd/login/Makefile
+++ b/usr/src/cmd/login/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,11 +19,11 @@
# CDDL HEADER END
#
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# ident "%Z%%M% %I% %E% SMI"
+#
PROG= login
OBJS= login.o login_audit.o
@@ -49,7 +48,7 @@ CLOBBERFILES += $(LOGINDEVPERM) $(ONC_SRCS)
CPPFLAGS += -DSYSV -DCONSOLE='"/dev/console"' -DSECURITY \
-D_FILE_OFFSET_BITS=64 -I$(SRC)/lib/pam_modules/krb5
-LDLIBS += -lcmd -lbsm -lpam -ldevinfo
+LDLIBS += -lbsm -lpam -ldevinfo
CFLAGS += $(CCVERBOSE)
.KEEP_STATE:
diff --git a/usr/src/cmd/lp/cmd/lpsched/Makefile b/usr/src/cmd/lp/cmd/lpsched/Makefile
index 2afbf2377c..83ccf68d6c 100644
--- a/usr/src/cmd/lp/cmd/lpsched/Makefile
+++ b/usr/src/cmd/lp/cmd/lpsched/Makefile
@@ -17,15 +17,13 @@
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
-
-
-#
#
-# ident "%Z%%M% %I% %E% SMI"
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# ident "%Z%%M% %I% %E% SMI"
+#
# cmd/lp/cmd/lpsched/lpsched/Makefile
#
@@ -104,7 +102,7 @@ LPLIBS = \
$(LIBSEC)
SYSLIBS= -lcurses -lgen -lcurses -lnsl -z lazyload \
- -ltsol -lsecdb -lcmd -lbsm -z nolazyload
+ -ltsol -lsecdb -lbsm -z nolazyload
LDLIBS += $(LPLIBS) $(SYSLIBS)
diff --git a/usr/src/cmd/mkpwdict/Makefile b/usr/src/cmd/mkpwdict/Makefile
index cb11b13dab..791fadf4c2 100644
--- a/usr/src/cmd/mkpwdict/Makefile
+++ b/usr/src/cmd/mkpwdict/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -35,8 +34,6 @@ CFLAGS += -I$(SRC)/lib/pam_modules/authtok_check
LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 -m
LINTFLAGS += -I$(SRC)/lib/pam_modules/authtok_check
-LDLIBS += -lcmd
-
CRACK_SRCDIR= $(SRC)/lib/pam_modules/authtok_check/
CRACK_OBJS= packer.o packlib.o dict.o stringlib.o
CRACK_SRCS= $(CRACK_OBJS:%.o=$(CRACK_SRCDIR)/%.c)
diff --git a/usr/src/cmd/pfexec/Makefile b/usr/src/cmd/pfexec/Makefile
index a492f266d9..4f60f15ddd 100644
--- a/usr/src/cmd/pfexec/Makefile
+++ b/usr/src/cmd/pfexec/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,10 +19,10 @@
# CDDL HEADER END
#
#
-# Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
+# ident "%Z%%M% %I% %E% SMI"
#
PROG= pfexec
@@ -39,7 +38,7 @@ ROOTBINPFEXEC = $(PFEXEC:%=$(ROOTBIN)/%)
.KEEP_STATE:
CPPFLAGS += -D_REENTRANT
-LDLIBS += -lcmd -lsecdb -lbsm
+LDLIBS += -lsecdb -lbsm
all: $(PROG)
diff --git a/usr/src/cmd/power/Makefile b/usr/src/cmd/power/Makefile
index b931f81f4c..d1f6534bc7 100644
--- a/usr/src/cmd/power/Makefile
+++ b/usr/src/cmd/power/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,14 +19,13 @@
# CDDL HEADER END
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
# cmd/power/Makefile
#
-#
DAEMON_SRCS = powerd.c sysstat.c
DAEMON_OBJS = $(DAEMON_SRCS:%.c=%.o)
@@ -66,7 +64,7 @@ sparc_LDEVINFO= -ldevinfo
i386_LDEVINFO=
DAEMON_LDLIBS = $(LDLIBS.cmd) -lkstat $($(MACH)_LDEVINFO)
-PMCFG_LDLIBS = $(LDLIBS.cmd) -lcmd $($(MACH)_LDEVINFO)
+PMCFG_LDLIBS = $(LDLIBS.cmd) $($(MACH)_LDEVINFO)
OWNER= root
ROOTUSRSBINPMCFG= $(PMCFG:%=$(ROOTUSRSBIN)/%)
diff --git a/usr/src/cmd/profiles/Makefile b/usr/src/cmd/profiles/Makefile
index 3ce4578496..2c356db68a 100644
--- a/usr/src/cmd/profiles/Makefile
+++ b/usr/src/cmd/profiles/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,8 @@
# CDDL HEADER END
#
#
-# Copyright (c) 1999 by Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
@@ -36,7 +36,7 @@ ROOTBINPROFILES = $(PROFILES:%=$(ROOTBIN)/%)
.KEEP_STATE:
CPPFLAGS += -D_REENTRANT
-LDLIBS += -lsecdb -lcmd
+LDLIBS += -lsecdb
all: $(PROG)
diff --git a/usr/src/cmd/rcm_daemon/Makefile.com b/usr/src/cmd/rcm_daemon/Makefile.com
index a25a4d32c2..fe3ca2f998 100644
--- a/usr/src/cmd/rcm_daemon/Makefile.com
+++ b/usr/src/cmd/rcm_daemon/Makefile.com
@@ -110,7 +110,7 @@ SUNW_network_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -llaadm
SUNW_ip_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -linetutil
SUNW_ip_anon_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -linetutil
-LDLIBS += -lgen -lelf -lcmd -lrcm -lnvpair -ldevinfo -lnsl -lsocket
+LDLIBS += -lgen -lelf -lrcm -lnvpair -ldevinfo -lnsl -lsocket
SRCS = $(RCM_SRC) $(COMMON_MOD_SRC)
diff --git a/usr/src/cmd/savecore/Makefile.com b/usr/src/cmd/savecore/Makefile.com
index 35b473066e..4b9faf5683 100644
--- a/usr/src/cmd/savecore/Makefile.com
+++ b/usr/src/cmd/savecore/Makefile.com
@@ -31,7 +31,6 @@ OBJS= savecore.o compress.o
include ../../Makefile.cmd
-LDLIBS += -lcmd
CFLAGS += $(CCVERBOSE)
CFLAGS64 += $(CCVERBOSE)
CPPFLAGS += -D_LARGEFILE64_SOURCE=1
diff --git a/usr/src/cmd/ssh/sshd/Makefile b/usr/src/cmd/ssh/sshd/Makefile
index 0685fc6be7..c96107ec5f 100644
--- a/usr/src/cmd/ssh/sshd/Makefile
+++ b/usr/src/cmd/ssh/sshd/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -19,7 +18,8 @@
#
# CDDL HEADER END
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -80,7 +80,6 @@ LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket \
-L$(ROOTSFWLIB) -lwrap \
$(OPENSSL_LDFLAGS) -lcrypto \
-lgss \
- -lcmd \
-lcontract
DYNFLAGS += $(OPENSSL_DYNFLAGS) $(C99_DISABLE)
diff --git a/usr/src/cmd/su/Makefile b/usr/src/cmd/su/Makefile
index e15981c3ea..9046af3a10 100644
--- a/usr/src/cmd/su/Makefile
+++ b/usr/src/cmd/su/Makefile
@@ -48,17 +48,17 @@ $(PROG_STATIC) := FILEMODE = 0555
# A reduced su.static is created, with just enough functionality
# to satisfy the needs of a single-user login with /usr not mounted.
# In particular, nss_files.so.1 may be dlopen()'ed at runtime.
-$(ROOTFS_PROG) := LDLIBS += -lcmd -lbsm -lpam -lsecdb
+$(ROOTFS_PROG) := LDLIBS += -lbsm -lpam -lsecdb
# The standard su is fully functional.
$(PROG) := CPPFLAGS += -DDYNAMIC_SU
-$(PROG) := LDLIBS += -lcmd -lbsm -lpam -lsecdb
+$(PROG) := LDLIBS += -lbsm -lpam -lsecdb
LINTFLAGS += -DDYNAMIC_SU
CLOBBERFILES += $(ROOTFS_PROG) $(EMB_PROG)
-lint := LDLIBS += -lcmd -lbsm -lpam -lsecdb
+lint := LDLIBS += -lbsm -lpam -lsecdb
.KEEP_STATE:
diff --git a/usr/src/cmd/sulogin/Makefile b/usr/src/cmd/sulogin/Makefile
index 6c7b4e5b57..a0658160db 100644
--- a/usr/src/cmd/sulogin/Makefile
+++ b/usr/src/cmd/sulogin/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -31,8 +30,6 @@ ROOTFS_PROG = $(PROG)
include ../Makefile.cmd
-LDLIBS += -lcmd
-
FILEMODE = 0555
OWNER = root
diff --git a/usr/src/cmd/tar/Makefile b/usr/src/cmd/tar/Makefile
index 2172afa2ac..e769a93542 100644
--- a/usr/src/cmd/tar/Makefile
+++ b/usr/src/cmd/tar/Makefile
@@ -17,8 +17,6 @@
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
-
-
#
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
@@ -33,12 +31,12 @@ DEFAULTFILES= tar.dfl
include ../Makefile.cmd
-CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I../../lib/libcmd/inc
+CPPFLAGS += -D_FILE_OFFSET_BITS=64
DCFILE= $(PROG).dc
LAZYLIBS = $(ZLAZYLOAD) -ltsol $(ZNOLAZYLOAD)
lint := LAZYLIBS = -ltsol
-LDLIBS += -lcmd -lsec $(LAZYLIBS)
+LDLIBS += -lsec $(LAZYLIBS)
CFLAGS += $(CCVERBOSE)
diff --git a/usr/src/cmd/utmpd/Makefile b/usr/src/cmd/utmpd/Makefile
index 74b2cbe53f..4b256151bb 100644
--- a/usr/src/cmd/utmpd/Makefile
+++ b/usr/src/cmd/utmpd/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,10 +19,10 @@
# CDDL HEADER END
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
+# ident "%Z%%M% %I% %E% SMI"
#
PROG= utmpd
@@ -38,7 +37,6 @@ SVCMETHOD = svc-utmpd
FILEMODE = 555
OWNER = root
GROUP = bin
-LDLIBS += -lcmd
$(ROOTMANIFEST) := FILEMODE = 444
$(ROOTMANIFEST) := GROUP = sys
diff --git a/usr/src/cmd/ypcmd/yppasswd/Makefile b/usr/src/cmd/ypcmd/yppasswd/Makefile
index 58e84fc30a..caa961d575 100644
--- a/usr/src/cmd/ypcmd/yppasswd/Makefile
+++ b/usr/src/cmd/ypcmd/yppasswd/Makefile
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -44,7 +43,7 @@ ROOTDIRS = $(NETSVC) $(NETYP)
# include library definitions
#LDLIBS += -lrpcsvc -lnsl -lcrypt -lintl -lgen
-LDLIBS += -lnsl -lcmd -lc -lnisdb
+LDLIBS += -lnsl -lnisdb -lc
# Pick up includes from library
CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile
index 14b189482c..7fd139658c 100644
--- a/usr/src/lib/Makefile
+++ b/usr/src/lib/Makefile
@@ -67,7 +67,6 @@ SUBDIRS += \
libmd5 \
librsm \
libmp .WAIT \
- libcmd \
libnsl \
libsecdb .WAIT \
librpcsvc \
@@ -94,6 +93,7 @@ SUBDIRS += \
libpthread .WAIT \
libslp \
libbsdmalloc \
+ libcmd \
libdoor \
libdevinfo \
libdladm \
@@ -464,11 +464,11 @@ $(CLOSED_BUILD)$(CLOSED)/lib/libelfsign: \
$(CLOSED)/lib/libike libcryptoutil pkcs11
libinetcfg: libnsl libsocket libdevinfo
libnsl: libmd5 libscf
-libmapid: libresolv libcmd
+libmapid: libresolv
libmacadm: libdevinfo
libuuid: libsocket
libinetutil: libsocket
-libsecdb: libcmd libnsl
+libsecdb: libnsl
libsasl: libgss libsocket pkcs11 libmd
sasl_plugins: pkcs11 libgss libsocket libsasl
libsctp: libsocket
diff --git a/usr/src/lib/common/inc/c_synonyms.h b/usr/src/lib/common/inc/c_synonyms.h
index 5d502a4c72..4f58fe6a3c 100644
--- a/usr/src/lib/common/inc/c_synonyms.h
+++ b/usr/src/lib/common/inc/c_synonyms.h
@@ -225,6 +225,9 @@ extern "C" {
#define decimal_to_extended _decimal_to_extended
#define decimal_to_quadruple _decimal_to_quadruple
#define decimal_to_single _decimal_to_single
+#define defcntl _defcntl
+#define defopen _defopen
+#define defread _defread
#define dgettext _dgettext
#define dladdr1 _dladdr1
#define dladdr _dladdr
diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile
index 9b794e55f5..d074ae071b 100644
--- a/usr/src/lib/libc/amd64/Makefile
+++ b/usr/src/lib/libc/amd64/Makefile
@@ -377,6 +377,7 @@ PORTGEN= \
csetlen.o \
ctime.o \
ctime_r.o \
+ deflt.o \
directio.o \
dirname.o \
div.o \
diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com
index aa3e7df8c1..c745580ab4 100644
--- a/usr/src/lib/libc/i386/Makefile.com
+++ b/usr/src/lib/libc/i386/Makefile.com
@@ -406,6 +406,7 @@ PORTGEN= \
csetlen.o \
ctime.o \
ctime_r.o \
+ deflt.o \
directio.o \
dirname.o \
div.o \
diff --git a/usr/src/lib/libc/inc/synonyms.h b/usr/src/lib/libc/inc/synonyms.h
index d0b790016a..78ec1cb30f 100644
--- a/usr/src/lib/libc/inc/synonyms.h
+++ b/usr/src/lib/libc/inc/synonyms.h
@@ -267,6 +267,9 @@ extern "C" {
#define decimal_to_extended _decimal_to_extended
#define decimal_to_quadruple _decimal_to_quadruple
#define decimal_to_single _decimal_to_single
+#define defcntl _defcntl
+#define defopen _defopen
+#define defread _defread
#define dgettext _dgettext
#define dirname _dirname
#define dladdr1 _dladdr1
diff --git a/usr/src/lib/libc/inc/tsd.h b/usr/src/lib/libc/inc/tsd.h
index 58042b983c..cc4440ef2c 100644
--- a/usr/src/lib/libc/inc/tsd.h
+++ b/usr/src/lib/libc/inc/tsd.h
@@ -18,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -59,6 +60,7 @@ typedef enum {
_T_GRBUF,
_T_SPBUF,
_T_DOORBUF,
+ _T_DEFREAD,
_T_NUM_ENTRIES /* this *must* be the last member */
} __tsd_item_t;
diff --git a/usr/src/lib/libcmd/common/deflt.c b/usr/src/lib/libc/port/gen/deflt.c
index a8f82edd8a..24cfd281fc 100644
--- a/usr/src/lib/libcmd/common/deflt.c
+++ b/usr/src/lib/libc/port/gen/deflt.c
@@ -32,74 +32,60 @@
#pragma ident "%Z%%M% %I% %E% SMI"
-/* LINTLIBRARY */
+#pragma weak defopen = _defopen
+#pragma weak defread = _defread
+#pragma weak defcntl = _defcntl
-#include "c_synonyms.h"
+#include "synonyms.h"
+#include "libc.h"
#include <stdio.h>
#include <stdlib.h>
#include <deflt.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
-#include <limits.h>
-#include <thread.h>
-#include <synch.h>
-#include <libintl.h>
#include <unistd.h>
-
-#pragma init(deflt_init)
+#include "tsd.h"
#define TSTBITS(flags, mask) (((flags) & (mask)) == (mask))
static void strip_quotes(char *);
-static thread_key_t thr_key;
-
struct thr_data {
int Dcflags; /* [re-]initialized on each call to defopen() */
FILE *fp;
- char buf[PATH_MAX];
+ char *buf;
};
+#define BUFFERSIZE 1024
+
/*
- * destructor for per-thread data, registered with thr_keycreate()
+ * destructor for per-thread data, registered with tsdalloc()
*/
static void
free_thr_data(void *arg)
{
struct thr_data *thr_data = (struct thr_data *)arg;
- if (thr_data->fp)
- fclose(thr_data->fp);
- free(thr_data);
-}
-
-/*
- * _init routine for this library. Set up per-thread-data-key
- */
-static void
-deflt_init(void)
-{
- (void) thr_keycreate(&thr_key, free_thr_data);
+ if (thr_data->fp) {
+ (void) fclose(thr_data->fp);
+ thr_data->fp = NULL;
+ }
+ if (thr_data->buf) {
+ lfree(thr_data->buf, BUFFERSIZE);
+ thr_data->buf = NULL;
+ }
}
/*
* get the per-thread-data-item for the calling thread
*/
static struct thr_data *
-_get_thr_data(void)
+get_thr_data(void)
{
- struct thr_data *thr_data = NULL;
-
- (void) thr_getspecific(thr_key, (void *)&thr_data);
- if (thr_data == NULL) {
- thr_data = malloc(sizeof (struct thr_data));
- if (thr_data != NULL) {
- thr_data->fp = NULL;
- thr_data->Dcflags = DC_STD;
- thr_setspecific(thr_key, thr_data);
- }
- }
+ struct thr_data *thr_data =
+ tsdalloc(_T_DEFREAD, sizeof (*thr_data), free_thr_data);
+
return (thr_data);
}
@@ -121,21 +107,35 @@ _get_thr_data(void)
int
defopen(char *fn)
{
- struct thr_data *thr_data = _get_thr_data();
+ struct thr_data *thr_data = get_thr_data();
if (thr_data == NULL)
return (-1);
- if (thr_data->fp != NULL)
+ if (thr_data->fp != NULL) {
(void) fclose(thr_data->fp);
-
- if (fn == NULL) {
thr_data->fp = NULL;
- return (0);
}
+ if (fn == NULL)
+ return (0);
+
if ((thr_data->fp = fopen(fn, "rF")) == NULL)
return (-1);
+
+ /*
+ * We allocate the big buffer only if the fopen() succeeds.
+ * Notice that we deallocate the buffer only when the thread exits.
+ * There are misguided applications that assume that data returned
+ * by defread() continues to exist after defopen(NULL) is called.
+ */
+ if (thr_data->buf == NULL &&
+ (thr_data->buf = lmalloc(BUFFERSIZE)) == NULL) {
+ (void) fclose(thr_data->fp);
+ thr_data->fp = NULL;
+ return (-1);
+ }
+
thr_data->Dcflags = DC_STD;
return (0);
@@ -163,15 +163,12 @@ defopen(char *fn)
char *
defread(char *cp)
{
- struct thr_data *thr_data = _get_thr_data();
+ struct thr_data *thr_data = get_thr_data();
int (*compare)(const char *, const char *, size_t);
char *buf_tmp, *ret_ptr = NULL;
size_t off, patlen;
- if (thr_data == NULL)
- return (NULL);
-
- if (thr_data->fp == NULL)
+ if (thr_data == NULL || thr_data->fp == NULL)
return (NULL);
compare = TSTBITS(thr_data->Dcflags, DC_CASE) ? strncmp : strncasecmp;
@@ -180,7 +177,7 @@ defread(char *cp)
if (!TSTBITS(thr_data->Dcflags, DC_NOREWIND))
rewind(thr_data->fp);
- while (fgets(thr_data->buf, sizeof (thr_data->buf), thr_data->fp)) {
+ while (fgets(thr_data->buf, BUFFERSIZE, thr_data->fp)) {
for (buf_tmp = thr_data->buf; *buf_tmp == ' '; buf_tmp++)
;
off = strlen(buf_tmp) - 1;
@@ -224,7 +221,7 @@ defread(char *cp)
int
defcntl(int cmd, int newflags)
{
- struct thr_data *thr_data = _get_thr_data();
+ struct thr_data *thr_data = get_thr_data();
int oldflags;
if (thr_data == NULL)
diff --git a/usr/src/lib/libc/port/gen/getgrnam_r.c b/usr/src/lib/libc/port/gen/getgrnam_r.c
index d1574b1985..2432e4a275 100644
--- a/usr/src/lib/libc/port/gen/getgrnam_r.c
+++ b/usr/src/lib/libc/port/gen/getgrnam_r.c
@@ -18,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -38,6 +39,7 @@
#include <sys/types.h>
#include <grp.h>
#include <memory.h>
+#include <deflt.h>
#include <nsswitch.h>
#include <nss_dbdefs.h>
#include <stdio.h>
@@ -254,8 +256,6 @@ _getgroupsbymember(const char *username, gid_t gid_array[],
int maxgids, int numgids)
{
struct nss_groupsbymem arg;
- char defval[BUFSIZ];
- FILE *defl;
arg.username = username;
arg.gid_array = gid_array;
@@ -282,21 +282,10 @@ _getgroupsbymember(const char *username, gid_t gid_array[],
*/
arg.force_slow_way = 1;
- /*
- * The "easy" way to do /etc/default/nss is to use the defread()
- * stuff from libcmd, but since we are in libc we don't want to
- * link ourselfs against libcmd, so instead we just do it by hand
- */
-
- if ((defl = fopen(__NSW_DEFAULT_FILE, "rF")) != NULL) {
- while (fgets(defval, sizeof (defval), defl) != NULL) {
- if (strncmp(USE_NETID_STR, defval,
- sizeof (USE_NETID_STR) - 1) == 0) {
- arg.force_slow_way = 0;
- break;
- }
- }
- (void) fclose(defl);
+ if (defopen(__NSW_DEFAULT_FILE) == 0) {
+ if (defread(USE_NETID_STR) != NULL)
+ arg.force_slow_way = 0;
+ (void) defopen(NULL);
}
(void) nss_search(&db_root, _nss_initf_group,
diff --git a/usr/src/lib/libc/port/gen/localtime.c b/usr/src/lib/libc/port/gen/localtime.c
index cd18896879..6ebeaf6ad5 100644
--- a/usr/src/lib/libc/port/gen/localtime.c
+++ b/usr/src/lib/libc/port/gen/localtime.c
@@ -2,9 +2,8 @@
* 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.
+ * 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.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -110,6 +110,7 @@
#include <synch.h>
#include <fcntl.h>
#include <errno.h>
+#include <deflt.h>
#include <sys/stat.h>
/* JAN_01_1902 cast to (int) - negative number of seconds from 1970 */
@@ -1987,96 +1988,34 @@ getrule(const char *strp, rule_t *rulep, int compat_flag)
/*
* Returns default value for TZ as specified in /etc/default/init file, if
* a default value for TZ is provided there.
- *
- * To strip quotes: if a '"', or '\''is found, then transfer the following
- * bytes forward, and overwrite the double or single quote. The tzS
- * pointer is used to keep track of the location in the buffer, to which bytes
- * pointed to by tzq, will be transferred. Then, the <value> string
- * should be NULL terminated. If no '"' or '\'' characters were encountered,
- * tzS will be NULL, so tzq should already be NULL-terminated.
- * However, if '"' or '\'' characters were encountered, then tzS will
- * be non-NULL, and *tzS should be set to the NULL character.
*/
static char *
get_default_tz(void)
{
- char *tz;
- int in;
-
- tz = NULL;
- in = open(TIMEZONE, O_RDONLY);
- if (in != -1) {
- int eof = 0;
- char tzFilebuf[BUFSIZ+1];
- char *p, *q;
- size_t bufsize;
-
- p = q = tzFilebuf;
- bufsize = BUFSIZ;
- for (;;) {
- char *lineE, *nextp;
- size_t mlen;
- int r;
-
- if (eof == 0) {
- r = read(in, q, bufsize);
- if (r <= 0)
- break;
- if (r < bufsize)
- eof = 1;
- *(q + r) = '\0';
- }
-
- if ((lineE = strchr(p, '\n')) == NULL) {
- /* line too long */
- break;
- }
- *lineE = '\0';
-
- if (strncmp(TZSTRING, p, sizeof (TZSTRING) - 1) == 0) {
- unsigned char *tzp, *tzq, *tzS;
-
- tzp = (unsigned char *)p +
- sizeof (TZSTRING) - 1;
- while (isspace(*tzp))
- tzp++;
- tzq = tzp;
- tzS = NULL;
- while (isspace(*tzq) == 0 &&
- *tzq != ';' &&
- *tzq != '#' &&
- *tzq != '\0') {
- if (*tzq == '"' ||
- *tzq == '\'') {
- if (tzS == NULL) {
- tzS = tzq;
- }
- } else {
- if (tzS != NULL) {
- *tzS = *tzq;
- tzS++;
- }
- }
- tzq++;
- }
- if (tzS != NULL)
- *tzS = '\0';
- else
- *tzq = '\0';
+ char *tz = NULL;
+ uchar_t *tzp, *tzq;
+ int flags;
+
+ if (defopen(TIMEZONE) == 0) {
+ flags = defcntl(DC_GETFLAGS, 0);
+ TURNON(flags, DC_STRIP_QUOTES);
+ (void) defcntl(DC_SETFLAGS, flags);
+
+ if ((tzp = (uchar_t *)defread(TZSTRING)) != NULL) {
+ while (isspace(*tzp))
+ tzp++;
+ tzq = tzp;
+ while (!isspace(*tzq) &&
+ *tzq != ';' &&
+ *tzq != '#' &&
+ *tzq != '\0')
+ tzq++;
+ *tzq = '\0';
+ if (*tzp != '\0')
tz = strdup((char *)tzp);
- break;
- }
- nextp = lineE + 1;
- if (eof == 0) {
- mlen = (q + r) - nextp;
- (void) memmove(p, nextp, mlen);
- q = p + mlen;
- bufsize = BUFSIZ - mlen;
- } else {
- p = nextp;
- }
}
- (void) close(in);
+
+ (void) defopen(NULL);
}
return (tz);
}
diff --git a/usr/src/lib/libc/port/llib-lc b/usr/src/lib/libc/port/llib-lc
index ba258a78aa..169b444f6a 100644
--- a/usr/src/lib/libc/port/llib-lc
+++ b/usr/src/lib/libc/port/llib-lc
@@ -33,6 +33,7 @@
#include <alloca.h>
#include <atomic.h>
#include <ctype.h>
+#include <deflt.h>
#include <dirent.h>
#include <dlfcn.h>
#include <door.h>
diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers
index 6d5cee49e7..00b826fd08 100644
--- a/usr/src/lib/libc/port/mapfile-vers
+++ b/usr/src/lib/libc/port/mapfile-vers
@@ -1441,6 +1441,12 @@ SUNWprivate_1.1 {
_decimal_to_extended;
_decimal_to_quadruple;
_decimal_to_single;
+ defcntl;
+ _defcntl;
+ defopen;
+ _defopen;
+ defread;
+ _defread;
_delete;
_dgettext;
_door_bind;
diff --git a/usr/src/lib/libc/sparc/Makefile b/usr/src/lib/libc/sparc/Makefile
index f8658e34cf..580c8ac7cd 100644
--- a/usr/src/lib/libc/sparc/Makefile
+++ b/usr/src/lib/libc/sparc/Makefile
@@ -429,6 +429,7 @@ PORTGEN= \
csetlen.o \
ctime.o \
ctime_r.o \
+ deflt.o \
directio.o \
dirname.o \
div.o \
diff --git a/usr/src/lib/libc/sparcv9/Makefile b/usr/src/lib/libc/sparcv9/Makefile
index 2a03ea74cf..9d5a72ddec 100644
--- a/usr/src/lib/libc/sparcv9/Makefile
+++ b/usr/src/lib/libc/sparcv9/Makefile
@@ -394,6 +394,7 @@ PORTGEN= \
csetlen.o \
ctime.o \
ctime_r.o \
+ deflt.o \
directio.o \
dirname.o \
div.o \
diff --git a/usr/src/lib/libcmd/Makefile.com b/usr/src/lib/libcmd/Makefile.com
index bc07b5cb06..11e09b5a14 100644
--- a/usr/src/lib/libcmd/Makefile.com
+++ b/usr/src/lib/libcmd/Makefile.com
@@ -27,16 +27,13 @@
LIBRARY = libcmd.a
VERS = .1
-OBJECTS = deflt.o
+OBJECTS = placeholder.o
include ../../Makefile.lib
-# install this library in the root filesystem
-include ../../Makefile.rootfs
-
LIBS = $(DYNLIB) $(LINTLIB)
-LDLIBS += -lc $(ZNODELETE)
+#LDLIBS += -lc
SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libcmd/common/llib-lcmd b/usr/src/lib/libcmd/common/llib-lcmd
index 151a717f07..c9de823563 100644
--- a/usr/src/lib/libcmd/common/llib-lcmd
+++ b/usr/src/lib/libcmd/common/llib-lcmd
@@ -2,9 +2,8 @@
* 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.
+ * 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.
@@ -19,16 +18,22 @@
*
* CDDL HEADER END
*/
+
/* LINTLIBRARY */
/* PROTOLIB1 */
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+
#pragma ident "%Z%%M% %I% %E% SMI"
-/* deflt.c */
+/*
+ * The def*() functions are the historical contents of libcmd.
+ * They have been moved to libc and libcmd contains only filter
+ * symbols for them, redirecting to libc.
+ */
int defopen(char *fn);
char *defread(char *cp);
int defcntl(int cmd, int newflags);
diff --git a/usr/src/lib/libcmd/common/mapfile-vers b/usr/src/lib/libcmd/common/mapfile-vers
index 1629c5c7eb..891b6fd3a2 100644
--- a/usr/src/lib/libcmd/common/mapfile-vers
+++ b/usr/src/lib/libcmd/common/mapfile-vers
@@ -27,9 +27,9 @@
SUNWprivate_1.1 {
global:
- defcntl;
- defopen;
- defread;
+ defcntl = FUNCTION FILTER libc.so.1;
+ defopen = FUNCTION FILTER libc.so.1;
+ defread = FUNCTION FILTER libc.so.1;
local:
*;
};
diff --git a/usr/src/lib/libcmd/common/placeholder.c b/usr/src/lib/libcmd/common/placeholder.c
new file mode 100644
index 0000000000..f4b2bc015c
--- /dev/null
+++ b/usr/src/lib/libcmd/common/placeholder.c
@@ -0,0 +1,40 @@
+/*
+ * 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 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*
+ * This is a placeholder file, containing nothing.
+ * It is here because the build of a library is structured such that
+ * at least one compilable file is required and that file must not be
+ * totally empty (else it draws an "empty compilation unit" warning).
+ * This is why the include of <stdio.h> appears below.
+ *
+ * This file should be deleted or renamed to something useful
+ * when the ksh93 project is integrated into libcmd.
+ */
+
+#include <stdio.h>
diff --git a/usr/src/lib/libgss/Makefile.com b/usr/src/lib/libgss/Makefile.com
index 82136b42d0..a14b9a5810 100644
--- a/usr/src/lib/libgss/Makefile.com
+++ b/usr/src/lib/libgss/Makefile.com
@@ -83,7 +83,7 @@ include ../../Makefile.lib
LIBS = $(DYNLIB) $(LINTLIB)
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
-LDLIBS += -lc -lcmd
+LDLIBS += -lc
CPPFLAGS += -I$(GSSCRED_DIR) -I$(SRC)/uts/common/gssapi/include \
-DHAVE_STDLIB_H
diff --git a/usr/src/lib/libmapid/Makefile.com b/usr/src/lib/libmapid/Makefile.com
index 1945db1e85..b1e86a05ff 100644
--- a/usr/src/lib/libmapid/Makefile.com
+++ b/usr/src/lib/libmapid/Makefile.com
@@ -49,7 +49,7 @@ $(ROOTSLINK32): $(ROOTLIBDIR)
SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
-LDLIBS += -lresolv -lcmd -lc
+LDLIBS += -lresolv -lc
CFLAGS += $(CCVERBOSE)
CPPFLAGS+= -I$(SRCDIR) -D_REENTRANT
diff --git a/usr/src/lib/libnisdb/Makefile b/usr/src/lib/libnisdb/Makefile
index 74e0ebbcef..539760931f 100644
--- a/usr/src/lib/libnisdb/Makefile
+++ b/usr/src/lib/libnisdb/Makefile
@@ -142,7 +142,7 @@ CPPFLAGS += -I$(SRC)/cmd/ypcmd
LIBS = $(DYNLIB)
ZDEFS=
-LDLIBS += -lnsl -lldap -lcmd -lc
+LDLIBS += -lnsl -lldap -lc
all := TARGET= all
clean := TARGET= clean
diff --git a/usr/src/lib/libpam/Makefile.com b/usr/src/lib/libpam/Makefile.com
index 21f842c941..b8ab490ee9 100644
--- a/usr/src/lib/libpam/Makefile.com
+++ b/usr/src/lib/libpam/Makefile.com
@@ -34,7 +34,7 @@ include ../../Makefile.rootfs
LIBS= $(DYNLIB) $(LINTLIB)
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
-LDLIBS += -lcmd -lc
+LDLIBS += -lc
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I $(SRCDIR)
diff --git a/usr/src/lib/libsecdb/Makefile.com b/usr/src/lib/libsecdb/Makefile.com
index 565045492f..3a9678d730 100644
--- a/usr/src/lib/libsecdb/Makefile.com
+++ b/usr/src/lib/libsecdb/Makefile.com
@@ -36,7 +36,7 @@ include ../../Makefile.lib
include ../../Makefile.rootfs
LIBS = $(DYNLIB) $(LINTLIB)
-LDLIBS += -lc -lnsl -lcmd
+LDLIBS += -lnsl -lc
SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/pam_modules/authtok_check/Makefile.com b/usr/src/lib/pam_modules/authtok_check/Makefile.com
index fecc4ca4a0..29b29c2372 100644
--- a/usr/src/lib/pam_modules/authtok_check/Makefile.com
+++ b/usr/src/lib/pam_modules/authtok_check/Makefile.com
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,12 +19,13 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# ident "%Z%%M% %I% %E% SMI"
+#
# usr/src/lib/pam_modules/authtok_check/Makefile.com
#
-# ident "%Z%%M% %I% %E% SMI"
LIBRARY= pam_authtok_check.a
VERS= .1
@@ -34,7 +34,7 @@ OBJECTS= authtok_check.o \
include ../../Makefile.pam_modules
-LDLIBS += -lpam -lcmd -lc
+LDLIBS += -lpam -lc
CPPFLAGS += -D_FILE_OFFSET_BITS=64
diff --git a/usr/src/lib/pam_modules/unix_account/Makefile.com b/usr/src/lib/pam_modules/unix_account/Makefile.com
index 35b6c0bc75..bc1af34425 100644
--- a/usr/src/lib/pam_modules/unix_account/Makefile.com
+++ b/usr/src/lib/pam_modules/unix_account/Makefile.com
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -34,7 +33,7 @@ OBJECTS= unix_acct.o
include ../../Makefile.pam_modules
-LDLIBS += -lpam -lcmd -lc
+LDLIBS += -lpam -lc
# Enable large file support for reading the lastlog file.
CPPFLAGS += -D_FILE_OFFSET_BITS=64
diff --git a/usr/src/lib/pam_modules/unix_auth/Makefile.com b/usr/src/lib/pam_modules/unix_auth/Makefile.com
index 5f84652d7f..d3fb47fdaa 100644
--- a/usr/src/lib/pam_modules/unix_auth/Makefile.com
+++ b/usr/src/lib/pam_modules/unix_auth/Makefile.com
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,12 +19,13 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# ident "%Z%%M% %I% %E% SMI"
+#
# usr/src/lib/pam_modules/unix_auth/Makefile.com
#
-# ident "%Z%%M% %I% %E% SMI"
LIBRARY= pam_unix_auth.a
VERS= .1
@@ -33,7 +33,7 @@ OBJECTS= unix_auth.o
include ../../Makefile.pam_modules
-LDLIBS += -lpam -lsecdb -lcmd -lc
+LDLIBS += -lpam -lsecdb -lc
all: $(LIBS)
diff --git a/usr/src/lib/pam_modules/unix_cred/Makefile.com b/usr/src/lib/pam_modules/unix_cred/Makefile.com
index 09060a6e68..b5de4963b7 100644
--- a/usr/src/lib/pam_modules/unix_cred/Makefile.com
+++ b/usr/src/lib/pam_modules/unix_cred/Makefile.com
@@ -2,9 +2,8 @@
# 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.
+# 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.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -34,7 +33,7 @@ OBJECTS= unix_cred.o
include ../../Makefile.pam_modules
-LDLIBS += -lbsm -lpam -lsecdb -lcmd -lproject -lc
+LDLIBS += -lbsm -lpam -lsecdb -lproject -lc
all: $(LIBS)
diff --git a/usr/src/lib/passwdutil/Makefile.com b/usr/src/lib/passwdutil/Makefile.com
index 573e057162..09a25b9627 100644
--- a/usr/src/lib/passwdutil/Makefile.com
+++ b/usr/src/lib/passwdutil/Makefile.com
@@ -58,7 +58,7 @@ LIBNAME= passwdutil
LIBS= $(DYNLIB) $(LINTLIB)
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
-LDLIBS += -lcmd -lsldap -lnsl -lc
+LDLIBS += -lsldap -lnsl -lc
CPPFLAGS += -DENABLE_SUNOS_AGING -D_REENTRANT \
-I$(SRC)/lib/libsldap/common -I$(SRC)/lib/libnsl/include
diff --git a/usr/src/pkgdefs/SUNWarc/prototype_com b/usr/src/pkgdefs/SUNWarc/prototype_com
index 6b83f1a5a5..c1f63747c0 100644
--- a/usr/src/pkgdefs/SUNWarc/prototype_com
+++ b/usr/src/pkgdefs/SUNWarc/prototype_com
@@ -80,8 +80,8 @@ s none usr/lib/llib-lbsm=../../lib/llib-lbsm
s none usr/lib/llib-lbsm.ln=../../lib/llib-lbsm.ln
s none usr/lib/llib-lc=../../lib/llib-lc
s none usr/lib/llib-lc.ln=../../lib/llib-lc.ln
-s none usr/lib/llib-lcmd=../../lib/llib-lcmd
-s none usr/lib/llib-lcmd.ln=../../lib/llib-lcmd.ln
+f none usr/lib/llib-lcmd 644 root bin
+f none usr/lib/llib-lcmd.ln 644 root bin
f none usr/lib/llib-lcrypt 644 root bin
f none usr/lib/llib-lcrypt.ln 644 root bin
f none usr/lib/llib-lcfgadm 644 root bin
diff --git a/usr/src/pkgdefs/SUNWarc/prototype_i386 b/usr/src/pkgdefs/SUNWarc/prototype_i386
index 0ee700dbb3..8099c626ab 100644
--- a/usr/src/pkgdefs/SUNWarc/prototype_i386
+++ b/usr/src/pkgdefs/SUNWarc/prototype_i386
@@ -72,7 +72,7 @@ s none usr/lib/amd64/llib-lbsm.ln=../../../lib/amd64/llib-lbsm.ln
s none usr/lib/amd64/llib-lpam.ln=../../../lib/amd64/llib-lpam.ln
s none usr/lib/amd64/llib-lc.ln=../../../lib/amd64/llib-lc.ln
f none usr/lib/amd64/llib-lcfgadm.ln 644 root bin
-s none usr/lib/amd64/llib-lcmd.ln=../../../lib/amd64/llib-lcmd.ln
+f none usr/lib/amd64/llib-lcmd.ln 644 root bin
s none usr/lib/amd64/llib-lcontract.ln=../../../lib/amd64/llib-lcontract.ln
s none usr/lib/amd64/llib-lctf.ln=../../../lib/amd64/llib-lctf.ln
f none usr/lib/amd64/llib-lcrypt.ln 644 root bin
diff --git a/usr/src/pkgdefs/SUNWarc/prototype_sparc b/usr/src/pkgdefs/SUNWarc/prototype_sparc
index fcdb2f4525..37f008e017 100644
--- a/usr/src/pkgdefs/SUNWarc/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWarc/prototype_sparc
@@ -68,7 +68,7 @@ s none usr/lib/sparcv9/llib-lbsm.ln=../../../lib/sparcv9/llib-lbsm.ln
s none usr/lib/sparcv9/llib-lpam.ln=../../../lib/sparcv9/llib-lpam.ln
s none usr/lib/sparcv9/llib-lc.ln=../../../lib/sparcv9/llib-lc.ln
f none usr/lib/sparcv9/llib-lcfgadm.ln 644 root bin
-s none usr/lib/sparcv9/llib-lcmd.ln=../../../lib/sparcv9/llib-lcmd.ln
+f none usr/lib/sparcv9/llib-lcmd.ln 644 root bin
s none usr/lib/sparcv9/llib-lcontract.ln=../../../lib/sparcv9/llib-lcontract.ln
s none usr/lib/sparcv9/llib-lctf.ln=../../../lib/sparcv9/llib-lctf.ln
f none usr/lib/sparcv9/llib-lcrypt.ln 644 root bin
diff --git a/usr/src/pkgdefs/SUNWarcr/prototype_com b/usr/src/pkgdefs/SUNWarcr/prototype_com
index 09a3de0467..05f71cd8c3 100644
--- a/usr/src/pkgdefs/SUNWarcr/prototype_com
+++ b/usr/src/pkgdefs/SUNWarcr/prototype_com
@@ -56,8 +56,6 @@ f none lib/llib-lc 644 root bin
f none lib/llib-lc.ln 644 root bin
f none lib/llib-lc_db 644 root bin
f none lib/llib-lc_db.ln 644 root bin
-f none lib/llib-lcmd 644 root bin
-f none lib/llib-lcmd.ln 644 root bin
f none lib/llib-lcontract 644 root bin
f none lib/llib-lcontract.ln 644 root bin
f none lib/llib-lctf 644 root bin
diff --git a/usr/src/pkgdefs/SUNWarcr/prototype_i386 b/usr/src/pkgdefs/SUNWarcr/prototype_i386
index a9e7bcc394..f02fab5d83 100644
--- a/usr/src/pkgdefs/SUNWarcr/prototype_i386
+++ b/usr/src/pkgdefs/SUNWarcr/prototype_i386
@@ -56,7 +56,6 @@ f none lib/amd64/llib-laio.ln 644 root bin
f none lib/amd64/llib-lbsm.ln 644 root bin
f none lib/amd64/llib-lc.ln 644 root bin
f none lib/amd64/llib-lc_db.ln 644 root bin
-f none lib/amd64/llib-lcmd.ln 644 root bin
f none lib/amd64/llib-lcontract.ln 644 root bin
f none lib/amd64/llib-lctf.ln 644 root bin
f none lib/amd64/llib-lcurses 644 root bin
diff --git a/usr/src/pkgdefs/SUNWarcr/prototype_sparc b/usr/src/pkgdefs/SUNWarcr/prototype_sparc
index 98fc3e8919..9cee1f2ca2 100644
--- a/usr/src/pkgdefs/SUNWarcr/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWarcr/prototype_sparc
@@ -56,7 +56,6 @@ f none lib/sparcv9/llib-laio.ln 644 root bin
f none lib/sparcv9/llib-lbsm.ln 644 root bin
f none lib/sparcv9/llib-lc.ln 644 root bin
f none lib/sparcv9/llib-lc_db.ln 644 root bin
-f none lib/sparcv9/llib-lcmd.ln 644 root bin
f none lib/sparcv9/llib-lcontract.ln 644 root bin
f none lib/sparcv9/llib-lctf.ln 644 root bin
f none lib/sparcv9/llib-lcurses 644 root bin
diff --git a/usr/src/pkgdefs/SUNWcsl/prototype_com b/usr/src/pkgdefs/SUNWcsl/prototype_com
index 74615ea231..a8e9305623 100644
--- a/usr/src/pkgdefs/SUNWcsl/prototype_com
+++ b/usr/src/pkgdefs/SUNWcsl/prototype_com
@@ -84,8 +84,8 @@ s none usr/lib/libc_db.so=../../lib/libc_db.so.1
s none usr/lib/libc_db.so.1=../../lib/libc_db.so.1
s none usr/lib/libcfgadm.so=./libcfgadm.so.1
f none usr/lib/libcfgadm.so.1 755 root bin
-s none usr/lib/libcmd.so=../../lib/libcmd.so.1
-s none usr/lib/libcmd.so.1=../../lib/libcmd.so.1
+s none usr/lib/libcmd.so=libcmd.so.1
+f none usr/lib/libcmd.so.1 755 root bin
s none usr/lib/libcmdutils.so.1=../../lib/libcmdutils.so.1
s none usr/lib/libcontract.so=../../lib/libcontract.so.1
s none usr/lib/libcontract.so.1=../../lib/libcontract.so.1
diff --git a/usr/src/pkgdefs/SUNWcsl/prototype_i386 b/usr/src/pkgdefs/SUNWcsl/prototype_i386
index d46f806fd5..21dc389597 100644
--- a/usr/src/pkgdefs/SUNWcsl/prototype_i386
+++ b/usr/src/pkgdefs/SUNWcsl/prototype_i386
@@ -140,8 +140,8 @@ s none usr/lib/amd64/libbsm.so.1=../../../lib/amd64/libbsm.so.1
s none usr/lib/amd64/libbsm.so=../../../lib/amd64/libbsm.so.1
f none usr/lib/amd64/libcfgadm.so.1 755 root bin
s none usr/lib/amd64/libcfgadm.so=libcfgadm.so.1
-s none usr/lib/amd64/libcmd.so.1=../../../lib/amd64/libcmd.so.1
-s none usr/lib/amd64/libcmd.so=../../../lib/amd64/libcmd.so.1
+f none usr/lib/amd64/libcmd.so.1 755 root bin
+s none usr/lib/amd64/libcmd.so=libcmd.so.1
s none usr/lib/amd64/libcmdutils.so.1=../../../lib/amd64/libcmdutils.so.1
s none usr/lib/amd64/libcontract.so.1=../../../lib/amd64/libcontract.so.1
s none usr/lib/amd64/libcontract.so=../../../lib/amd64/libcontract.so.1
diff --git a/usr/src/pkgdefs/SUNWcsl/prototype_sparc b/usr/src/pkgdefs/SUNWcsl/prototype_sparc
index 4211632035..f83c4c616e 100644
--- a/usr/src/pkgdefs/SUNWcsl/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWcsl/prototype_sparc
@@ -133,8 +133,8 @@ s none usr/lib/sparcv9/libbsm.so.1=../../../lib/sparcv9/libbsm.so.1
s none usr/lib/sparcv9/libbsm.so=../../../lib/sparcv9/libbsm.so.1
f none usr/lib/sparcv9/libcfgadm.so.1 755 root bin
s none usr/lib/sparcv9/libcfgadm.so=libcfgadm.so.1
-s none usr/lib/sparcv9/libcmd.so.1=../../../lib/sparcv9/libcmd.so.1
-s none usr/lib/sparcv9/libcmd.so=../../../lib/sparcv9/libcmd.so.1
+f none usr/lib/sparcv9/libcmd.so.1 755 root bin
+s none usr/lib/sparcv9/libcmd.so=libcmd.so.1
s none usr/lib/sparcv9/libcmdutils.so.1=../../../lib/sparcv9/libcmdutils.so.1
f none usr/lib/sparcv9/libcrle.so.1 755 root bin
f none usr/lib/sparcv9/libcryptoutil.so.1 755 root bin
diff --git a/usr/src/pkgdefs/SUNWcslr/prototype_com b/usr/src/pkgdefs/SUNWcslr/prototype_com
index 08751f4cda..3e17e0b961 100644
--- a/usr/src/pkgdefs/SUNWcslr/prototype_com
+++ b/usr/src/pkgdefs/SUNWcslr/prototype_com
@@ -58,8 +58,6 @@ s none lib/libbsm.so=libbsm.so.1
s none lib/libc.so=libc.so.1
f none lib/libc_db.so.1 755 root bin
s none lib/libc_db.so=libc_db.so.1
-f none lib/libcmd.so.1 755 root bin
-s none lib/libcmd.so=libcmd.so.1
f none lib/libcmdutils.so.1 755 root bin
f none lib/libcontract.so.1 755 root bin
s none lib/libcontract.so=libcontract.so.1
diff --git a/usr/src/pkgdefs/SUNWcslr/prototype_i386 b/usr/src/pkgdefs/SUNWcslr/prototype_i386
index 77ff9670fa..d7ab2182f3 100644
--- a/usr/src/pkgdefs/SUNWcslr/prototype_i386
+++ b/usr/src/pkgdefs/SUNWcslr/prototype_i386
@@ -63,8 +63,6 @@ s none lib/amd64/libc.so=libc.so.1
f none lib/amd64/libc.so.1 755 root bin
s none lib/amd64/libc_db.so=libc_db.so.1
f none lib/amd64/libc_db.so.1 755 root bin
-s none lib/amd64/libcmd.so=libcmd.so.1
-f none lib/amd64/libcmd.so.1 755 root bin
f none lib/amd64/libcmdutils.so.1 755 root bin
s none lib/amd64/libcontract.so=libcontract.so.1
f none lib/amd64/libcontract.so.1 755 root bin
diff --git a/usr/src/pkgdefs/SUNWcslr/prototype_sparc b/usr/src/pkgdefs/SUNWcslr/prototype_sparc
index 4f15ae2ac0..fd6388a7e3 100644
--- a/usr/src/pkgdefs/SUNWcslr/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWcslr/prototype_sparc
@@ -66,8 +66,6 @@ s none lib/sparcv9/libc.so=libc.so.1
f none lib/sparcv9/libc.so.1 755 root bin
s none lib/sparcv9/libc_db.so=libc_db.so.1
f none lib/sparcv9/libc_db.so.1 755 root bin
-s none lib/sparcv9/libcmd.so=libcmd.so.1
-f none lib/sparcv9/libcmd.so.1 755 root bin
s none lib/sparcv9/libcontract.so=libcontract.so.1
f none lib/sparcv9/libcontract.so.1 755 root bin
f none lib/sparcv9/libcmdutils.so.1 755 root bin
diff --git a/usr/src/tools/scripts/bfu.sh b/usr/src/tools/scripts/bfu.sh
index edddd2908c..7494a69102 100644
--- a/usr/src/tools/scripts/bfu.sh
+++ b/usr/src/tools/scripts/bfu.sh
@@ -6151,6 +6151,18 @@ mondo_loop() {
from_new_aggrconf=0
fi
+ # Remove libcmd from $root/lib. It has moved back to $usr/lib.
+ rm -f $root/lib/libcmd.so
+ rm -f $root/lib/libcmd.so.1
+ rm -f $root/lib/amd64/libcmd.so
+ rm -f $root/lib/amd64/libcmd.so.1
+ rm -f $root/lib/sparcv9/libcmd.so
+ rm -f $root/lib/sparcv9/libcmd.so.1
+ rm -f $root/lib/llib-lcmd
+ rm -f $root/lib/llib-lcmd.ln
+ rm -f $root/lib/amd64/llib-lcmd.ln
+ rm -f $root/lib/sparcv9/llib-lcmd.ln
+
# End of pre-archive extraction hacks.
if [ $diskless = no -a $zone = global ]; then