diff options
| author | Tim Foster <tim.foster@joyent.com> | 2019-10-25 13:00:51 +0000 |
|---|---|---|
| committer | Tim Foster <tim.foster@joyent.com> | 2019-10-25 13:00:51 +0000 |
| commit | d86c9e6d4e922c695bb2793dddf0ea48d61ca963 (patch) | |
| tree | 50a63b04f1ec2b82b50a21df278acff3f24b364e /usr/src/lib | |
| parent | 29de67cafe15bb9e2c61bd58e6183182a7735036 (diff) | |
| parent | 7284664a1faa361af4ff33ba5435d43d3ee07bf2 (diff) | |
| download | illumos-joyent-d86c9e6d4e922c695bb2793dddf0ea48d61ca963.tar.gz | |
[illumos-gate merge]
commit 7284664a1faa361af4ff33ba5435d43d3ee07bf2
11816 iscsi initiator gets confused if attached before root file system mount
commit 55908bd733fe029d49237b91c700655997242419
11843 update Intel microcode to 20190918
commit b9c9c3595312927fb362936529c5679117843b93
11826 Buffer overflow and memory leak in "libbsm"
commit 78a2e113edb6fe0a0382b403b55d92e8f0bba78f
9531 Want netstat -u to show PIDs associated with sockets
11707 provide 64-bit libdhcpagent
11708 netstat should be smatch and CERRWARN clean
Conflicts:
usr/src/data/ucode/Makefile
usr/src/data/ucode/README.ucode
usr/src/data/ucode/intel/000206D6-01
usr/src/data/ucode/intel/000206D7-01
usr/src/data/ucode/intel/000306D4-40
usr/src/data/ucode/intel/000306F4-80
usr/src/data/ucode/intel/00040671-02
usr/src/data/ucode/intel/000406F1-01
usr/src/data/ucode/intel/00050654-01
usr/src/data/ucode/intel/00050657-01
usr/src/data/ucode/intel/00050662-10
usr/src/data/ucode/intel/00050663-10
usr/src/data/ucode/intel/00050664-10
usr/src/data/ucode/intel/00050665-10
usr/src/data/ucode/intel/000506CA-01
Diffstat (limited to 'usr/src/lib')
| -rw-r--r-- | usr/src/lib/README.Makefiles | 9 | ||||
| -rw-r--r-- | usr/src/lib/libbsm/common/au_preselect.c | 29 | ||||
| -rw-r--r-- | usr/src/lib/libdhcpagent/Makefile | 6 | ||||
| -rw-r--r-- | usr/src/lib/libdhcpagent/Makefile.com | 8 | ||||
| -rw-r--r-- | usr/src/lib/libdhcpagent/amd64/Makefile | 32 | ||||
| -rw-r--r-- | usr/src/lib/libdhcpagent/common/dhcpagent_ipc.h | 17 | ||||
| -rw-r--r-- | usr/src/lib/libdhcpagent/i386/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/lib/libdhcpagent/sparc/Makefile | 4 |
8 files changed, 77 insertions, 32 deletions
diff --git a/usr/src/lib/README.Makefiles b/usr/src/lib/README.Makefiles index b576c3a9fc..4ca4c2f68a 100644 --- a/usr/src/lib/README.Makefiles +++ b/usr/src/lib/README.Makefiles @@ -21,9 +21,6 @@ # # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# Writing Library Makefiles in ON =============================== @@ -446,14 +443,14 @@ The third section typically consists of the following macros: when compiling 64-bit code. Since all 64-bit code is compiled $(CCVERBOSE), you usually do not need to modify CFLAGS64. - COPTFLAG (if necessary) + COPTFLAG (if necessary) Set to control the optimization level used by the C compiler when compiling 32-bit code. You should only set this if absolutely necessary, and it should only contain optimization-related settings (or -g). - COPTFLAG64 (if necessary) + COPTFLAG64 (if necessary) Set to control the optimization level used by the C compiler when compiling 64-bit code. You should only set this if absolutely @@ -619,7 +616,7 @@ outlined in this document: lib/libdhcpagent - Example of a simple 32-bit only library that obtains its sources + Example of a simple 32/64-bit library that obtains its sources from multiple directories. lib/ncad_addr diff --git a/usr/src/lib/libbsm/common/au_preselect.c b/usr/src/lib/libbsm/common/au_preselect.c index 67512a6212..ea80c4bfb4 100644 --- a/usr/src/lib/libbsm/common/au_preselect.c +++ b/usr/src/lib/libbsm/common/au_preselect.c @@ -22,6 +22,8 @@ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2019 by Western Digital Corporation */ /* @@ -29,6 +31,7 @@ */ #include <sys/types.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <bsm/audit.h> @@ -150,11 +153,10 @@ load_map() event_count = 0; setauevent(); while ((evp = getauevent()) != (au_event_ent_t *)NULL) { - if (event_count > alloc_count) - if (realloc_map() == -1) { - endauevent(); - return (-1); - } + if (event_count == alloc_count && realloc_map() == -1) { + endauevent(); + return (-1); + } event_map[event_count].event = evp->ae_number; event_map[event_count].class = evp->ae_class; ++event_count; @@ -170,12 +172,21 @@ load_map() static int realloc_map() { - register size_t rsize; - rsize = sizeof (event_map_t) * (alloc_count + ALLOC_INCR); + uint_t new_alloc_count; + event_map_t *new_event_map; - if ((event_map = (event_map_t *) - realloc(event_map, rsize)) == (event_map_t *)NULL) + new_alloc_count = alloc_count + ALLOC_INCR; + if (new_alloc_count <= alloc_count) { + errno = ENOMEM; return (-1); + } + + if ((new_event_map = recallocarray(event_map, alloc_count, + new_alloc_count, sizeof (event_map_t))) == NULL) + return (-1); + + alloc_count = new_alloc_count; + event_map = new_event_map; return (0); } diff --git a/usr/src/lib/libdhcpagent/Makefile b/usr/src/lib/libdhcpagent/Makefile index 0232cfd534..e45522b144 100644 --- a/usr/src/lib/libdhcpagent/Makefile +++ b/usr/src/lib/libdhcpagent/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.lib @@ -30,16 +30,16 @@ include ../Makefile.lib HDRS = dhcp_hostconf.h dhcpagent_ipc.h dhcpagent_util.h dhcp_stable.h HDRDIR = common SUBDIRS = $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) all := TARGET = all clean := TARGET = clean clobber := TARGET = clobber install := TARGET = install -lint := TARGET = lint .KEEP_STATE: -all clean clobber install lint: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) install_h: $(ROOTHDRS) diff --git a/usr/src/lib/libdhcpagent/Makefile.com b/usr/src/lib/libdhcpagent/Makefile.com index c62f6c26c2..7efc8bcc94 100644 --- a/usr/src/lib/libdhcpagent/Makefile.com +++ b/usr/src/lib/libdhcpagent/Makefile.com @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. LIBRARY = libdhcpagent.a VERS = .1 @@ -33,14 +34,13 @@ include ../../Makefile.lib # install this library in the root filesystem include ../../Makefile.rootfs -LIBS = $(DYNLIB) $(LINTLIB) +LIBS = $(DYNLIB) LDLIBS += -lc -lsocket -ldhcputil -luuid -ldlpi -lcontract SRCDIR = ../common -$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) -CFLAGS += $(CCVERBOSE) +CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-type-limits # needs work @@ -50,6 +50,4 @@ SMOFF += allocating_enough_data all: $(LIBS) -lint: lintcheck - include ../../Makefile.targ diff --git a/usr/src/lib/libdhcpagent/amd64/Makefile b/usr/src/lib/libdhcpagent/amd64/Makefile new file mode 100644 index 0000000000..2b996f5855 --- /dev/null +++ b/usr/src/lib/libdhcpagent/amd64/Makefile @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 1999-2001 by Sun Microsystems, Inc. +# All rights reserved. +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# + +include ../Makefile.com +include ../../Makefile.lib.64 + +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libdhcpagent/common/dhcpagent_ipc.h b/usr/src/lib/libdhcpagent/common/dhcpagent_ipc.h index be2da33666..beed5b1ffc 100644 --- a/usr/src/lib/libdhcpagent/common/dhcpagent_ipc.h +++ b/usr/src/lib/libdhcpagent/common/dhcpagent_ipc.h @@ -24,6 +24,7 @@ */ /* * Copyright (c) 2013, 2015 by Delphix. All rights reserved. + * Copyright 2019 OmniOS Community Edition (OmniOSce) Association. */ #ifndef _DHCPAGENT_IPC_H @@ -92,7 +93,7 @@ typedef enum { typedef enum { DHCP_DROP, DHCP_EXTEND, DHCP_PING, DHCP_RELEASE, - DHCP_START, DHCP_STATUS, DHCP_INFORM, DHCP_GET_TAG, + DHCP_START, DHCP_STATUS, DHCP_INFORM, DHCP_GET_TAG, DHCP_NIPC, /* number of supported requests */ DHCP_PRIMARY = 0x100, DHCP_V6 = 0x200 @@ -219,10 +220,16 @@ typedef struct dhcp_status { char if_name[LIFNAMSIZ]; DHCPSTATE if_state; /* state of interface; see above */ - time_t if_began; /* time lease began (absolute) */ - time_t if_t1; /* renewing time (absolute) */ - time_t if_t2; /* rebinding time (absolute) */ - time_t if_lease; /* lease expiration time (absolute) */ + /* + * We use int64_t here so that the structure is the same in both + * 32 and 64-bit, since it is passed via IPC. + * Once everything that uses this is 64-bit, these could be changed + * to time_t. + */ + int64_t if_began; /* time lease began (absolute) */ + int64_t if_t1; /* renewing time (absolute) */ + int64_t if_t2; /* rebinding time (absolute) */ + int64_t if_lease; /* lease expiration time (absolute) */ uint16_t if_dflags; /* DHCP flags on this if; see above */ diff --git a/usr/src/lib/libdhcpagent/i386/Makefile b/usr/src/lib/libdhcpagent/i386/Makefile index fa5f2962d2..64d377eef1 100644 --- a/usr/src/lib/libdhcpagent/i386/Makefile +++ b/usr/src/lib/libdhcpagent/i386/Makefile @@ -23,9 +23,9 @@ # Copyright (c) 1999-2001 by Sun Microsystems, Inc. # All rights reserved. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com -install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/lib/libdhcpagent/sparc/Makefile b/usr/src/lib/libdhcpagent/sparc/Makefile index fa5f2962d2..64d377eef1 100644 --- a/usr/src/lib/libdhcpagent/sparc/Makefile +++ b/usr/src/lib/libdhcpagent/sparc/Makefile @@ -23,9 +23,9 @@ # Copyright (c) 1999-2001 by Sun Microsystems, Inc. # All rights reserved. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com -install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) +install: all $(ROOTLIBS) $(ROOTLINKS) |
