Mercurial > illumos > illumos-gate
changeset 2923:da82ab368162
PSARC 2006/561 libcmd must die
6480998 libcmd must die
line wrap: on
line diff
--- a/usr/src/Makefile.lint Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/Makefile.lint Fri Oct 13 20:48:34 2006 -0700 @@ -303,6 +303,7 @@ lib/libc \ lib/libc_db \ lib/libcfgadm \ + lib/libcmd \ lib/libcmdutils \ lib/libcontract \ lib/libcryptoutil \
--- a/usr/src/Targetdirs Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/Targetdirs Fri Oct 13 20:48:34 2006 -0700 @@ -822,8 +822,6 @@ $(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:= 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 @@ 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 @@ 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 @@ /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 @@ /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 @@ /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 @@ /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 \
--- a/usr/src/cmd/auths/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/auths/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ .KEEP_STATE: CPPFLAGS += -D_REENTRANT -LDLIBS += -lsecdb -lcmd +LDLIBS += -lsecdb all: $(PROG)
--- a/usr/src/cmd/cmd-inet/usr.bin/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cmd-inet/usr.bin/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ # 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
--- a/usr/src/cmd/cmd-inet/usr.bin/finger.c Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cmd-inet/usr.bin/finger.c Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ */ flags = defcntl(DC_GETFLAGS, 0); TURNOFF(flags, DC_CASE); - defcntl(DC_SETFLAGS, flags); + (void) defcntl(DC_SETFLAGS, flags); if (cp = defread(passvar)) { options = cp;
--- a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ -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:
--- a/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cmd-inet/usr.bin/netstat/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ 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:
--- a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ # 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 \
--- a/usr/src/cmd/cmd-inet/usr.sbin/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cmd-inet/usr.sbin/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ $(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
--- a/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -39,7 +39,7 @@ 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)/%)
--- a/usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ /* 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;
--- a/usr/src/cmd/cron/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/cron/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -141,7 +141,7 @@ 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
--- a/usr/src/cmd/devfsadm/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/devfsadm/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ 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)
--- a/usr/src/cmd/fs.d/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/fs.d/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -88,8 +88,7 @@ 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
--- a/usr/src/cmd/fs.d/autofs/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/fs.d/autofs/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -85,10 +85,9 @@ 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
--- a/usr/src/cmd/fs.d/nfs/mount/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/fs.d/nfs/mount/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ # POFILE= mount.po -LDLIBS += -lrpcsvc -lnsl -lsocket -lcmd +LDLIBS += -lrpcsvc -lnsl -lsocket CPPFLAGS += -I. -I../.. -I../lib CFLAGS += $(CCVERBOSE)
--- a/usr/src/cmd/fs.d/nfs/mountd/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/fs.d/nfs/mountd/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -24,6 +24,7 @@ # # ident "%Z%%M% %I% %E% SMI" # + FSTYPE = nfs TYPEPROG = mountd ATTMK = $(TYPEPROG) @@ -35,7 +36,7 @@ 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)
--- a/usr/src/cmd/fs.d/nfs/nfsd/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/fs.d/nfs/nfsd/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -31,7 +31,7 @@ include ../../Makefile.fstype -LDLIBS += -lnsl -lcmd -lnvpair +LDLIBS += -lnsl -lnvpair LOCAL= nfsd.o OBJS= $(LOCAL) nfs_tbind.o thrpool.o
--- a/usr/src/cmd/fs.d/nfs/nfslog/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/fs.d/nfs/nfslog/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 # # -#ident "%Z%%M% %I% %E% SMI" +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# ident "%Z%%M% %I% %E% SMI" # # cmd/fs.d/nfs/nfslog/Makefile @@ -40,7 +39,7 @@ 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
--- a/usr/src/cmd/kbd/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/kbd/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ PROG = kbd CFLAGS += $(CCVERBOSE) -LDLIBS += -lcmd $(ROOTMANIFEST) := FILEMODE = 0444
--- a/usr/src/cmd/keyserv/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/keyserv/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ LDLIBS += -lnsl chkey := LDLIBS += -lsldap -keyserv := LDLIBS += -lmp -lcmd +keyserv := LDLIBS += -lmp newkey := LDLIBS += -lsldap -lsocket .KEEP_STATE:
--- a/usr/src/cmd/keyserv/keyserv.c Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/keyserv/keyserv.c Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ */ 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) {
--- a/usr/src/cmd/login/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/login/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 # # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# ident "%Z%%M% %I% %E% SMI" # PROG= login @@ -49,7 +48,7 @@ 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:
--- a/usr/src/cmd/lp/cmd/lpsched/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/lp/cmd/lpsched/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ $(LIBSEC) SYSLIBS= -lcurses -lgen -lcurses -lnsl -z lazyload \ - -ltsol -lsecdb -lcmd -lbsm -z nolazyload + -ltsol -lsecdb -lbsm -z nolazyload LDLIBS += $(LPLIBS) $(SYSLIBS)
--- a/usr/src/cmd/mkpwdict/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/mkpwdict/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ 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)
--- a/usr/src/cmd/pfexec/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/pfexec/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ .KEEP_STATE: CPPFLAGS += -D_REENTRANT -LDLIBS += -lcmd -lsecdb -lbsm +LDLIBS += -lsecdb -lbsm all: $(PROG)
--- a/usr/src/cmd/power/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/power/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ 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)/%)
--- a/usr/src/cmd/profiles/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/profiles/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ .KEEP_STATE: CPPFLAGS += -D_REENTRANT -LDLIBS += -lsecdb -lcmd +LDLIBS += -lsecdb all: $(PROG)
--- a/usr/src/cmd/rcm_daemon/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/rcm_daemon/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -110,7 +110,7 @@ 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)
--- a/usr/src/cmd/savecore/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/savecore/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -31,7 +31,6 @@ include ../../Makefile.cmd -LDLIBS += -lcmd CFLAGS += $(CCVERBOSE) CFLAGS64 += $(CCVERBOSE) CPPFLAGS += -D_LARGEFILE64_SOURCE=1
--- a/usr/src/cmd/ssh/sshd/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/ssh/sshd/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ -L$(ROOTSFWLIB) -lwrap \ $(OPENSSL_LDFLAGS) -lcrypto \ -lgss \ - -lcmd \ -lcontract DYNFLAGS += $(OPENSSL_DYNFLAGS) $(C99_DISABLE)
--- a/usr/src/cmd/su/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/su/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -48,17 +48,17 @@ # 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:
--- a/usr/src/cmd/sulogin/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/sulogin/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ include ../Makefile.cmd -LDLIBS += -lcmd - FILEMODE = 0555 OWNER = root
--- a/usr/src/cmd/tar/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/tar/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ 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)
--- a/usr/src/cmd/utmpd/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/utmpd/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ FILEMODE = 555 OWNER = root GROUP = bin -LDLIBS += -lcmd $(ROOTMANIFEST) := FILEMODE = 444 $(ROOTMANIFEST) := GROUP = sys
--- a/usr/src/cmd/ypcmd/yppasswd/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/cmd/ypcmd/yppasswd/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ # 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
--- a/usr/src/lib/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -67,7 +67,6 @@ libmd5 \ librsm \ libmp .WAIT \ - libcmd \ libnsl \ libsecdb .WAIT \ librpcsvc \ @@ -94,6 +93,7 @@ libpthread .WAIT \ libslp \ libbsdmalloc \ + libcmd \ libdoor \ libdevinfo \ libdladm \ @@ -464,11 +464,11 @@ $(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
--- a/usr/src/lib/common/inc/c_synonyms.h Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/common/inc/c_synonyms.h Fri Oct 13 20:48:34 2006 -0700 @@ -225,6 +225,9 @@ #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
--- a/usr/src/lib/libc/amd64/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/amd64/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -377,6 +377,7 @@ csetlen.o \ ctime.o \ ctime_r.o \ + deflt.o \ directio.o \ dirname.o \ div.o \
--- a/usr/src/lib/libc/i386/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/i386/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -406,6 +406,7 @@ csetlen.o \ ctime.o \ ctime_r.o \ + deflt.o \ directio.o \ dirname.o \ div.o \
--- a/usr/src/lib/libc/inc/synonyms.h Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/inc/synonyms.h Fri Oct 13 20:48:34 2006 -0700 @@ -267,6 +267,9 @@ #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
--- a/usr/src/lib/libc/inc/tsd.h Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/inc/tsd.h Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ _T_GRBUF, _T_SPBUF, _T_DOORBUF, + _T_DEFREAD, _T_NUM_ENTRIES /* this *must* be the last member */ } __tsd_item_t;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/lib/libc/port/gen/deflt.c Fri Oct 13 20:48:34 2006 -0700 @@ -0,0 +1,275 @@ +/* + * 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. + */ + +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + +/* Copyright (c) 1987, 1988 Microsoft Corporation */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak defopen = _defopen +#pragma weak defread = _defread +#pragma weak defcntl = _defcntl + +#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 <unistd.h> +#include "tsd.h" + +#define TSTBITS(flags, mask) (((flags) & (mask)) == (mask)) + +static void strip_quotes(char *); + +struct thr_data { + int Dcflags; /* [re-]initialized on each call to defopen() */ + FILE *fp; + char *buf; +}; + +#define BUFFERSIZE 1024 + +/* + * 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) { + (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) +{ + struct thr_data *thr_data = + tsdalloc(_T_DEFREAD, sizeof (*thr_data), free_thr_data); + + return (thr_data); +} + +/* + * defopen() - declare defopen filename + * + * defopen(fn) + * char *fn + * + * If 'fn' is non-null; it is a full pathname of a file + * which becomes the one read by subsequent defread() calls. + * If 'fn' is null the defopen file is closed. + * + * see defread() for more details. + * + * EXIT returns 0 if ok + * returns -1 if error + */ +int +defopen(char *fn) +{ + struct thr_data *thr_data = get_thr_data(); + + if (thr_data == NULL) + return (-1); + + if (thr_data->fp != NULL) { + (void) fclose(thr_data->fp); + thr_data->fp = NULL; + } + + 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); +} + +/* + * defread() - read an entry from the defopen file + * + * defread(cp) + * char *cp + * + * The defopen data file must have been previously opened by + * defopen(). defread scans the data file looking for a line + * which begins with the string '*cp'. If such a line is found, + * defread returns a pointer to the first character following + * the matched string (*cp). If no line is found or no file + * is open, defread() returns NULL. + * + * Note that there is no way to simulatniously peruse multiple + * defopen files; since there is no way of indicating 'which one' + * to defread(). If you want to peruse a secondary file you must + * recall defopen(). If you need to go back to the first file, + * you must call defopen() again. + */ +char * +defread(char *cp) +{ + 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 || thr_data->fp == NULL) + return (NULL); + + compare = TSTBITS(thr_data->Dcflags, DC_CASE) ? strncmp : strncasecmp; + patlen = strlen(cp); + + if (!TSTBITS(thr_data->Dcflags, DC_NOREWIND)) + rewind(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; + if (buf_tmp[off] == '\n') + buf_tmp[off] = 0; + else + break; /* line too long */ + if ((*compare)(cp, buf_tmp, patlen) == 0) { + /* found it */ + /* strip quotes if requested */ + if (TSTBITS(thr_data->Dcflags, DC_STRIP_QUOTES)) { + strip_quotes(buf_tmp); + } + ret_ptr = &buf_tmp[patlen]; + break; + } + } + + return (ret_ptr); +} + +/* + * defcntl -- default control + * + * SYNOPSIS + * oldflags = defcntl(cmd, arg); + * + * ENTRY + * cmd Command. One of DC_GET, DC_SET. + * arg Depends on command. If DC_GET, ignored. If + * DC_GET, new flags value, created by ORing the DC_* bits. + * RETURN + * oldflags Old value of flags. -1 on error. + * NOTES + * Currently only one bit of flags implemented, namely respect/ + * ignore case. The routine is as general as it is so that we + * leave our options open. E.g. we might want to specify rewind/ + * norewind before each defread. + */ + +int +defcntl(int cmd, int newflags) +{ + struct thr_data *thr_data = get_thr_data(); + int oldflags; + + if (thr_data == NULL) + return (-1); + + switch (cmd) { + case DC_GETFLAGS: /* query */ + oldflags = thr_data->Dcflags; + break; + case DC_SETFLAGS: /* set */ + oldflags = thr_data->Dcflags; + thr_data->Dcflags = newflags; + break; + default: /* error */ + oldflags = -1; + break; + } + + return (oldflags); +} + +/* + * strip_quotes -- strip double (") or single (') quotes from a buffer + * + * ENTRY + * ptr initial string + * + * EXIT + * ptr string with quotes (if any) removed + */ +static void +strip_quotes(char *ptr) +{ + char *strip_ptr = NULL; + + while (*ptr != '\0') { + if ((*ptr == '"') || (*ptr == '\'')) { + if (strip_ptr == NULL) + strip_ptr = ptr; /* skip over quote */ + } else { + if (strip_ptr != NULL) { + *strip_ptr = *ptr; + strip_ptr++; + } + } + ptr++; + } + if (strip_ptr != NULL) { + *strip_ptr = '\0'; + } +}
--- a/usr/src/lib/libc/port/gen/getgrnam_r.c Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/port/gen/getgrnam_r.c Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ 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 @@ */ 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,
--- a/usr/src/lib/libc/port/gen/localtime.c Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/port/gen/localtime.c Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ /* * 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; + char *tz = NULL; + uchar_t *tzp, *tzq; + int flags; - 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; + if (defopen(TIMEZONE) == 0) { + flags = defcntl(DC_GETFLAGS, 0); + TURNON(flags, DC_STRIP_QUOTES); + (void) defcntl(DC_SETFLAGS, flags); - 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'; + 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); }
--- a/usr/src/lib/libc/port/llib-lc Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/port/llib-lc Fri Oct 13 20:48:34 2006 -0700 @@ -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>
--- a/usr/src/lib/libc/port/mapfile-vers Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/port/mapfile-vers Fri Oct 13 20:48:34 2006 -0700 @@ -1441,6 +1441,12 @@ _decimal_to_extended; _decimal_to_quadruple; _decimal_to_single; + defcntl; + _defcntl; + defopen; + _defopen; + defread; + _defread; _delete; _dgettext; _door_bind;
--- a/usr/src/lib/libc/sparc/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/sparc/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -429,6 +429,7 @@ csetlen.o \ ctime.o \ ctime_r.o \ + deflt.o \ directio.o \ dirname.o \ div.o \
--- a/usr/src/lib/libc/sparcv9/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libc/sparcv9/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -394,6 +394,7 @@ csetlen.o \ ctime.o \ ctime_r.o \ + deflt.o \ directio.o \ dirname.o \ div.o \
--- a/usr/src/lib/libcmd/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libcmd/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -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)
--- a/usr/src/lib/libcmd/common/deflt.c Fri Oct 13 18:01:44 2006 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,278 +0,0 @@ -/* - * 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. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* Copyright (c) 1987, 1988 Microsoft Corporation */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* LINTLIBRARY */ - -#include "c_synonyms.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) - -#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]; -}; - -/* - * destructor for per-thread data, registered with thr_keycreate() - */ -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); -} - -/* - * get the per-thread-data-item for the calling thread - */ -static struct thr_data * -_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); - } - } - return (thr_data); -} - -/* - * defopen() - declare defopen filename - * - * defopen(fn) - * char *fn - * - * If 'fn' is non-null; it is a full pathname of a file - * which becomes the one read by subsequent defread() calls. - * If 'fn' is null the defopen file is closed. - * - * see defread() for more details. - * - * EXIT returns 0 if ok - * returns -1 if error - */ -int -defopen(char *fn) -{ - struct thr_data *thr_data = _get_thr_data(); - - if (thr_data == NULL) - return (-1); - - if (thr_data->fp != NULL) - (void) fclose(thr_data->fp); - - if (fn == NULL) { - thr_data->fp = NULL; - return (0); - } - - if ((thr_data->fp = fopen(fn, "rF")) == NULL) - return (-1); - thr_data->Dcflags = DC_STD; - - return (0); -} - -/* - * defread() - read an entry from the defopen file - * - * defread(cp) - * char *cp - * - * The defopen data file must have been previously opened by - * defopen(). defread scans the data file looking for a line - * which begins with the string '*cp'. If such a line is found, - * defread returns a pointer to the first character following - * the matched string (*cp). If no line is found or no file - * is open, defread() returns NULL. - * - * Note that there is no way to simulatniously peruse multiple - * defopen files; since there is no way of indicating 'which one' - * to defread(). If you want to peruse a secondary file you must - * recall defopen(). If you need to go back to the first file, - * you must call defopen() again. - */ -char * -defread(char *cp) -{ - 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) - return (NULL); - - compare = TSTBITS(thr_data->Dcflags, DC_CASE) ? strncmp : strncasecmp; - patlen = strlen(cp); - - if (!TSTBITS(thr_data->Dcflags, DC_NOREWIND)) - rewind(thr_data->fp); - - while (fgets(thr_data->buf, sizeof (thr_data->buf), thr_data->fp)) { - for (buf_tmp = thr_data->buf; *buf_tmp == ' '; buf_tmp++) - ; - off = strlen(buf_tmp) - 1; - if (buf_tmp[off] == '\n') - buf_tmp[off] = 0; - else - break; /* line too long */ - if ((*compare)(cp, buf_tmp, patlen) == 0) { - /* found it */ - /* strip quotes if requested */ - if (TSTBITS(thr_data->Dcflags, DC_STRIP_QUOTES)) { - strip_quotes(buf_tmp); - } - ret_ptr = &buf_tmp[patlen]; - break; - } - } - - return (ret_ptr); -} - -/* - * defcntl -- default control - * - * SYNOPSIS - * oldflags = defcntl(cmd, arg); - * - * ENTRY - * cmd Command. One of DC_GET, DC_SET. - * arg Depends on command. If DC_GET, ignored. If - * DC_GET, new flags value, created by ORing the DC_* bits. - * RETURN - * oldflags Old value of flags. -1 on error. - * NOTES - * Currently only one bit of flags implemented, namely respect/ - * ignore case. The routine is as general as it is so that we - * leave our options open. E.g. we might want to specify rewind/ - * norewind before each defread. - */ - -int -defcntl(int cmd, int newflags) -{ - struct thr_data *thr_data = _get_thr_data(); - int oldflags; - - if (thr_data == NULL) - return (-1); - - switch (cmd) { - case DC_GETFLAGS: /* query */ - oldflags = thr_data->Dcflags; - break; - case DC_SETFLAGS: /* set */ - oldflags = thr_data->Dcflags; - thr_data->Dcflags = newflags; - break; - default: /* error */ - oldflags = -1; - break; - } - - return (oldflags); -} - -/* - * strip_quotes -- strip double (") or single (') quotes from a buffer - * - * ENTRY - * ptr initial string - * - * EXIT - * ptr string with quotes (if any) removed - */ -static void -strip_quotes(char *ptr) -{ - char *strip_ptr = NULL; - - while (*ptr != '\0') { - if ((*ptr == '"') || (*ptr == '\'')) { - if (strip_ptr == NULL) - strip_ptr = ptr; /* skip over quote */ - } else { - if (strip_ptr != NULL) { - *strip_ptr = *ptr; - strip_ptr++; - } - } - ptr++; - } - if (strip_ptr != NULL) { - *strip_ptr = '\0'; - } -}
--- a/usr/src/lib/libcmd/common/llib-lcmd Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libcmd/common/llib-lcmd Fri Oct 13 20:48:34 2006 -0700 @@ -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);
--- a/usr/src/lib/libcmd/common/mapfile-vers Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libcmd/common/mapfile-vers Fri Oct 13 20:48:34 2006 -0700 @@ -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: *; };
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/lib/libcmd/common/placeholder.c Fri Oct 13 20:48:34 2006 -0700 @@ -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>
--- a/usr/src/lib/libgss/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libgss/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -83,7 +83,7 @@ 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
--- a/usr/src/lib/libmapid/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libmapid/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -49,7 +49,7 @@ SRCDIR = ../common $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) -LDLIBS += -lresolv -lcmd -lc +LDLIBS += -lresolv -lc CFLAGS += $(CCVERBOSE) CPPFLAGS+= -I$(SRCDIR) -D_REENTRANT
--- a/usr/src/lib/libnisdb/Makefile Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libnisdb/Makefile Fri Oct 13 20:48:34 2006 -0700 @@ -142,7 +142,7 @@ LIBS = $(DYNLIB) ZDEFS= -LDLIBS += -lnsl -lldap -lcmd -lc +LDLIBS += -lnsl -lldap -lc all := TARGET= all clean := TARGET= clean
--- a/usr/src/lib/libpam/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libpam/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -34,7 +34,7 @@ LIBS= $(DYNLIB) $(LINTLIB) $(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC) -LDLIBS += -lcmd -lc +LDLIBS += -lc CFLAGS += $(CCVERBOSE) CPPFLAGS += -I $(SRCDIR)
--- a/usr/src/lib/libsecdb/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/libsecdb/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -36,7 +36,7 @@ include ../../Makefile.rootfs LIBS = $(DYNLIB) $(LINTLIB) -LDLIBS += -lc -lnsl -lcmd +LDLIBS += -lnsl -lc SRCDIR = ../common $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
--- a/usr/src/lib/pam_modules/authtok_check/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/pam_modules/authtok_check/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ include ../../Makefile.pam_modules -LDLIBS += -lpam -lcmd -lc +LDLIBS += -lpam -lc CPPFLAGS += -D_FILE_OFFSET_BITS=64
--- a/usr/src/lib/pam_modules/unix_account/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/pam_modules/unix_account/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ 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
--- a/usr/src/lib/pam_modules/unix_auth/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/pam_modules/unix_auth/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ include ../../Makefile.pam_modules -LDLIBS += -lpam -lsecdb -lcmd -lc +LDLIBS += -lpam -lsecdb -lc all: $(LIBS)
--- a/usr/src/lib/pam_modules/unix_cred/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/pam_modules/unix_cred/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -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 @@ include ../../Makefile.pam_modules -LDLIBS += -lbsm -lpam -lsecdb -lcmd -lproject -lc +LDLIBS += -lbsm -lpam -lsecdb -lproject -lc all: $(LIBS)
--- a/usr/src/lib/passwdutil/Makefile.com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/lib/passwdutil/Makefile.com Fri Oct 13 20:48:34 2006 -0700 @@ -58,7 +58,7 @@ 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
--- a/usr/src/pkgdefs/SUNWarc/prototype_com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWarc/prototype_com Fri Oct 13 20:48:34 2006 -0700 @@ -80,8 +80,8 @@ 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
--- a/usr/src/pkgdefs/SUNWarc/prototype_i386 Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWarc/prototype_i386 Fri Oct 13 20:48:34 2006 -0700 @@ -72,7 +72,7 @@ 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
--- a/usr/src/pkgdefs/SUNWarc/prototype_sparc Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWarc/prototype_sparc Fri Oct 13 20:48:34 2006 -0700 @@ -68,7 +68,7 @@ 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
--- a/usr/src/pkgdefs/SUNWarcr/prototype_com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWarcr/prototype_com Fri Oct 13 20:48:34 2006 -0700 @@ -56,8 +56,6 @@ 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
--- a/usr/src/pkgdefs/SUNWarcr/prototype_i386 Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWarcr/prototype_i386 Fri Oct 13 20:48:34 2006 -0700 @@ -56,7 +56,6 @@ 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
--- a/usr/src/pkgdefs/SUNWarcr/prototype_sparc Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWarcr/prototype_sparc Fri Oct 13 20:48:34 2006 -0700 @@ -56,7 +56,6 @@ 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
--- a/usr/src/pkgdefs/SUNWcsl/prototype_com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWcsl/prototype_com Fri Oct 13 20:48:34 2006 -0700 @@ -84,8 +84,8 @@ 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
--- a/usr/src/pkgdefs/SUNWcsl/prototype_i386 Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWcsl/prototype_i386 Fri Oct 13 20:48:34 2006 -0700 @@ -140,8 +140,8 @@ 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
--- a/usr/src/pkgdefs/SUNWcsl/prototype_sparc Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWcsl/prototype_sparc Fri Oct 13 20:48:34 2006 -0700 @@ -133,8 +133,8 @@ 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
--- a/usr/src/pkgdefs/SUNWcslr/prototype_com Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWcslr/prototype_com Fri Oct 13 20:48:34 2006 -0700 @@ -58,8 +58,6 @@ 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
--- a/usr/src/pkgdefs/SUNWcslr/prototype_i386 Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWcslr/prototype_i386 Fri Oct 13 20:48:34 2006 -0700 @@ -63,8 +63,6 @@ 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
--- a/usr/src/pkgdefs/SUNWcslr/prototype_sparc Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/pkgdefs/SUNWcslr/prototype_sparc Fri Oct 13 20:48:34 2006 -0700 @@ -66,8 +66,6 @@ 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
--- a/usr/src/tools/scripts/bfu.sh Fri Oct 13 18:01:44 2006 -0700 +++ b/usr/src/tools/scripts/bfu.sh Fri Oct 13 20:48:34 2006 -0700 @@ -6151,6 +6151,18 @@ 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