diff options
author | Antonello Cruz <Antonello.Cruz@Sun.COM> | 2010-05-24 14:14:47 -0700 |
---|---|---|
committer | Antonello Cruz <Antonello.Cruz@Sun.COM> | 2010-05-24 14:14:47 -0700 |
commit | b56bf881a9655cb27b53cba1468312f7c6dfb0a2 (patch) | |
tree | 83afaaf2a38b5e61bff1c8702eff6b6166db2647 /usr/src | |
parent | 72c9c96770c90a8042add81e56bb8a2f9e4a29dc (diff) | |
download | illumos-joyent-b56bf881a9655cb27b53cba1468312f7c6dfb0a2.tar.gz |
6934233 A generic net_address SMF property type would be useful.
6934227 SMF should validate net_address_v4 amd net_address_v6 property types
6954776 libnsl should not depend on libscf
PSARC/2010/153 Remove libnsl dependency on libscf
PSARC/2010/157 SMF networking type extensions
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/fs.d/autofs/Makefile | 10 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/nfs/mount/Makefile | 6 | ||||
-rw-r--r-- | usr/src/common/svc/repcache_protocol.h | 6 | ||||
-rw-r--r-- | usr/src/lib/libnsl/Makefile.com | 5 | ||||
-rw-r--r-- | usr/src/lib/libnsl/common/daemon_utils.c | 58 | ||||
-rw-r--r-- | usr/src/lib/libnsl/common/mapfile-vers | 4 | ||||
-rw-r--r-- | usr/src/lib/libscf/Makefile.com | 8 | ||||
-rw-r--r-- | usr/src/lib/libscf/common/lowlevel.c | 5 | ||||
-rw-r--r-- | usr/src/lib/libscf/common/mapfile-vers | 4 | ||||
-rw-r--r-- | usr/src/lib/libscf/common/midlevel.c | 51 | ||||
-rw-r--r-- | usr/src/lib/libscf/common/scf_type.c | 86 | ||||
-rw-r--r-- | usr/src/lib/libscf/inc/libscf.h | 6 | ||||
-rw-r--r-- | usr/src/lib/libscf/inc/libscf_priv.h | 10 | ||||
-rw-r--r-- | usr/src/lib/libshare/nfs/libshare_nfs.h | 4 | ||||
-rw-r--r-- | usr/src/lib/libshare/smb/libshare_smb.c | 1 |
15 files changed, 165 insertions, 99 deletions
diff --git a/usr/src/cmd/fs.d/autofs/Makefile b/usr/src/cmd/fs.d/autofs/Makefile index 71021cbce5..e061dd180f 100644 --- a/usr/src/cmd/fs.d/autofs/Makefile +++ b/usr/src/cmd/fs.d/autofs/Makefile @@ -18,9 +18,7 @@ # # CDDL HEADER END # -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. # # cmd/fs.d/autofs/Makefile @@ -82,9 +80,9 @@ POFILE= autofs.po GREP= egrep SED= sed -$(AUTO) := LDLIBS += -lnsl -lsldap -$(MOUNT):= LDLIBS += -lnsl -$(TYPEPROG) := LDLIBS += -lrpcsvc -lsocket -lnsl -lsldap -lkstat +$(AUTO) := LDLIBS += -lnsl -lsldap -lscf +$(MOUNT):= LDLIBS += -lscf +$(TYPEPROG) := LDLIBS += -lrpcsvc -lsocket -lnsl -lsldap -lkstat -lscf CFLAGS += $(CCVERBOSE) -D_FILE_OFFSET_BITS=64 CPPFLAGS= -I. -I.. -I../nfs/lib $(CPPFLAGS.master) -D_REENTRANT \ diff --git a/usr/src/cmd/fs.d/nfs/mount/Makefile b/usr/src/cmd/fs.d/nfs/mount/Makefile index 11d028efdc..6de22ec2e6 100644 --- a/usr/src/cmd/fs.d/nfs/mount/Makefile +++ b/usr/src/cmd/fs.d/nfs/mount/Makefile @@ -18,9 +18,7 @@ # # CDDL HEADER END # -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # # cmd/fs.d/nfs/mount/Makefile @@ -48,7 +46,7 @@ UNCHECKED_HDRS= webnfs.h # POFILE= mount.po -LDLIBS += -lrpcsvc -lnsl -lsocket +LDLIBS += -lrpcsvc -lnsl -lsocket -lscf CPPFLAGS += -I. -I../.. -I../lib CFLAGS += $(CCVERBOSE) diff --git a/usr/src/common/svc/repcache_protocol.h b/usr/src/common/svc/repcache_protocol.h index 58bc356c90..04d5396f4d 100644 --- a/usr/src/common/svc/repcache_protocol.h +++ b/usr/src/common/svc/repcache_protocol.h @@ -20,15 +20,12 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _REPCACHE_PROTOCOL_H #define _REPCACHE_PROTOCOL_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * The Repository Cache Protocol * ----------------------------- @@ -576,6 +573,7 @@ typedef enum rep_protocol_value_type { REP_PROTOCOL_SUBTYPE_HOST = REP_PROTOCOL_TYPE_STRING|('h' << 8), REP_PROTOCOL_SUBTYPE_HOSTNAME = REP_PROTOCOL_TYPE_STRING|('N' << 8), + REP_PROTOCOL_SUBTYPE_NETADDR = REP_PROTOCOL_TYPE_STRING|('n' << 8), REP_PROTOCOL_SUBTYPE_NETADDR_V4 = REP_PROTOCOL_TYPE_STRING|('4' << 8), REP_PROTOCOL_SUBTYPE_NETADDR_V6 = REP_PROTOCOL_TYPE_STRING|('6' << 8) } rep_protocol_value_type_t; diff --git a/usr/src/lib/libnsl/Makefile.com b/usr/src/lib/libnsl/Makefile.com index 84d4b6c5fa..2c70210d38 100644 --- a/usr/src/lib/libnsl/Makefile.com +++ b/usr/src/lib/libnsl/Makefile.com @@ -20,8 +20,7 @@ # # -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. # LIBRARY= libnsl.a @@ -203,7 +202,7 @@ CCFLAGS64 += -_CC=-features=conststrings LIBMP = -lmp lint := LIBMP = -LDLIBS += $(LIBMP) -lmd -lscf -lc +LDLIBS += $(LIBMP) -lmd -lc $(LINTLIB):= SRCS=$(SRCDIR)/$(LINTSRC) LINTFLAGS += -m -DPORTMAP diff --git a/usr/src/lib/libnsl/common/daemon_utils.c b/usr/src/lib/libnsl/common/daemon_utils.c index b364e735c6..99e1fc6a38 100644 --- a/usr/src/lib/libnsl/common/daemon_utils.c +++ b/usr/src/lib/libnsl/common/daemon_utils.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. @@ -21,12 +20,9 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "mt.h" #include <stdio.h> #include <stdlib.h> @@ -43,32 +39,8 @@ #include <ucontext.h> #include <syslog.h> #include <rpcsvc/daemon_utils.h> -#include <libscf.h> static int open_daemon_lock(const char *, int); -static int is_auto_enabled(char *); - -/* - * Check an array of services and enable any that don't have the - * "application/auto_enable" property set to "false", which is - * the interface to turn off this behaviour (see PSARC 2004/739). - */ -void -_check_services(char **svcs) -{ - char *s; - - for (; *svcs; svcs++) { - if (is_auto_enabled(*svcs) == 0) - continue; - if ((s = smf_get_state(*svcs)) != NULL) { - if (strcmp(SCF_STATE_STRING_DISABLED, s) == 0) - (void) smf_enable_instance(*svcs, - SMF_TEMPORARY); - free(s); - } - } -} /* * Use an advisory lock to ensure that only one daemon process is @@ -213,27 +185,3 @@ _create_daemon_lock(const char *name, uid_t uid, gid_t gid) return (ret); } - -/* - * Check the "application/auto_enable" property for the passed FMRI. - * scf_simple_prop_get() should find the property on an instance - * or on the service FMRI. The routine returns: - * -1: inconclusive (likely no such property or FMRI) - * 0: auto_enable is false - * 1: auto_enable is true - */ -int -is_auto_enabled(char *fmri) -{ - scf_simple_prop_t *prop; - int retval = -1; - uint8_t *ret; - - prop = scf_simple_prop_get(NULL, fmri, "application", "auto_enable"); - if (!prop) - return (retval); - ret = scf_simple_prop_next_boolean(prop); - retval = (*ret != 0); - scf_simple_prop_free(prop); - return (retval); -} diff --git a/usr/src/lib/libnsl/common/mapfile-vers b/usr/src/lib/libnsl/common/mapfile-vers index f6352e64cd..762f155bf5 100644 --- a/usr/src/lib/libnsl/common/mapfile-vers +++ b/usr/src/lib/libnsl/common/mapfile-vers @@ -19,8 +19,7 @@ # CDDL HEADER END # # -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. # # @@ -305,7 +304,6 @@ SUNWprivate_1.4 { global: _build_internal_algs; _check_daemon_lock; - _check_services; _clean_trash; _create_daemon_lock; _duplicate_alg; diff --git a/usr/src/lib/libscf/Makefile.com b/usr/src/lib/libscf/Makefile.com index b2f3589247..784d2ef265 100644 --- a/usr/src/lib/libscf/Makefile.com +++ b/usr/src/lib/libscf/Makefile.com @@ -19,8 +19,7 @@ # CDDL HEADER END # # -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. # LIBRARY = libscf.a @@ -44,7 +43,7 @@ $(NATIVE_BUILD)VERS = $(NATIVE_BUILD)LIBS = $(DYNLIB) LDLIBS_i386 += -lsmbios -LDLIBS += -luutil -lc -lgen +LDLIBS += -luutil -lc -lgen -lnsl LDLIBS += $(LDLIBS_$(MACH)) SRCDIR = ../common @@ -64,7 +63,8 @@ LIBUUTIL = $(SRC)/lib/libuutil MY_NATIVE_CPPFLAGS =\ -DNATIVE_BUILD $(DTEXTDOM) \ -I../inc -I$(COMDIR) -I$(LIBUUTIL)/common -I$(ROOTHDRDIR) -MY_NATIVE_LDLIBS = -L$(LIBUUTIL)/native -R$(LIBUUTIL)/native -luutil -lc -lgen +MY_NATIVE_LDLIBS = -L$(LIBUUTIL)/native -R$(LIBUUTIL)/native -luutil -lc -lgen \ + -lnsl MY_NATIVE_LDLIBS_i386 = -lsmbios MY_NATIVE_LDLIBS += $(MY_NATIVE_LDLIBS_$(MACH)) diff --git a/usr/src/lib/libscf/common/lowlevel.c b/usr/src/lib/libscf/common/lowlevel.c index 92028e610b..27136167a5 100644 --- a/usr/src/lib/libscf/common/lowlevel.c +++ b/usr/src/lib/libscf/common/lowlevel.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -301,6 +300,7 @@ static const struct { {SCF_TYPE_FMRI, REP_PROTOCOL_SUBTYPE_FMRI, "fmri"}, {SCF_TYPE_HOST, REP_PROTOCOL_SUBTYPE_HOST, "host"}, {SCF_TYPE_HOSTNAME, REP_PROTOCOL_SUBTYPE_HOSTNAME, "hostname"}, + {SCF_TYPE_NET_ADDR, REP_PROTOCOL_SUBTYPE_NETADDR, "net_address"}, {SCF_TYPE_NET_ADDR_V4, REP_PROTOCOL_SUBTYPE_NETADDR_V4, "net_address_v4"}, {SCF_TYPE_NET_ADDR_V6, REP_PROTOCOL_SUBTYPE_NETADDR_V6, @@ -4845,6 +4845,7 @@ scf_value_set_from_string(scf_value_t *v, scf_type_t type, const char *str) case SCF_TYPE_FMRI: case SCF_TYPE_HOST: case SCF_TYPE_HOSTNAME: + case SCF_TYPE_NET_ADDR: case SCF_TYPE_NET_ADDR_V4: case SCF_TYPE_NET_ADDR_V6: ty = scf_type_to_protocol_type(type); diff --git a/usr/src/lib/libscf/common/mapfile-vers b/usr/src/lib/libscf/common/mapfile-vers index 50815efb73..b3ae93f4d1 100644 --- a/usr/src/lib/libscf/common/mapfile-vers +++ b/usr/src/lib/libscf/common/mapfile-vers @@ -19,8 +19,7 @@ # CDDL HEADER END # # -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. # # @@ -318,6 +317,7 @@ SUNWprivate_1.1 { scf_get_boot_config_ovr; scf_is_fastboot_default; scf_fastreboot_default_set_transient; + _check_services; local: *; }; diff --git a/usr/src/lib/libscf/common/midlevel.c b/usr/src/lib/libscf/common/midlevel.c index e9b8854adf..c466391761 100644 --- a/usr/src/lib/libscf/common/midlevel.c +++ b/usr/src/lib/libscf/common/midlevel.c @@ -256,6 +256,7 @@ fill_prop(scf_property_t *prop, const char *pgname, const char *propname, case SCF_TYPE_USTRING: case SCF_TYPE_HOST: case SCF_TYPE_HOSTNAME: + case SCF_TYPE_NET_ADDR: case SCF_TYPE_NET_ADDR_V4: case SCF_TYPE_NET_ADDR_V6: case SCF_TYPE_URI: @@ -332,6 +333,7 @@ error1: case SCF_TYPE_USTRING: case SCF_TYPE_HOST: case SCF_TYPE_HOSTNAME: + case SCF_TYPE_NET_ADDR: case SCF_TYPE_NET_ADDR_V4: case SCF_TYPE_NET_ADDR_V6: case SCF_TYPE_URI: @@ -1751,6 +1753,7 @@ scf_simple_prop_free(scf_simple_prop_t *prop) case SCF_TYPE_USTRING: case SCF_TYPE_HOST: case SCF_TYPE_HOSTNAME: + case SCF_TYPE_NET_ADDR: case SCF_TYPE_NET_ADDR_V4: case SCF_TYPE_NET_ADDR_V6: case SCF_TYPE_URI: @@ -2317,6 +2320,7 @@ scf_next_val(scf_simple_prop_t *prop, scf_type_t type) case SCF_TYPE_USTRING: case SCF_TYPE_HOST: case SCF_TYPE_HOSTNAME: + case SCF_TYPE_NET_ADDR: case SCF_TYPE_NET_ADDR_V4: case SCF_TYPE_NET_ADDR_V6: case SCF_TYPE_URI: @@ -3001,3 +3005,50 @@ out: return (ret); } + +/* + * Check the "application/auto_enable" property for the passed FMRI. + * scf_simple_prop_get() should find the property on an instance + * or on the service FMRI. The routine returns: + * -1: inconclusive (likely no such property or FMRI) + * 0: auto_enable is false + * 1: auto_enable is true + */ +static int +is_auto_enabled(char *fmri) +{ + scf_simple_prop_t *prop; + int retval = -1; + uint8_t *ret; + + prop = scf_simple_prop_get(NULL, fmri, SCF_GROUP_APPLICATION, + "auto_enable"); + if (!prop) + return (retval); + ret = scf_simple_prop_next_boolean(prop); + retval = (*ret != 0); + scf_simple_prop_free(prop); + return (retval); +} + +/* + * Check an array of services and enable any that don't have the + * "application/auto_enable" property set to "false", which is + * the interface to turn off this behaviour (see PSARC 2004/739). + */ +void +_check_services(char **svcs) +{ + char *s; + + for (; *svcs; svcs++) { + if (is_auto_enabled(*svcs) == 0) + continue; + if ((s = smf_get_state(*svcs)) != NULL) { + if (strcmp(SCF_STATE_STRING_DISABLED, s) == 0) + (void) smf_enable_instance(*svcs, + SMF_TEMPORARY); + free(s); + } + } +} diff --git a/usr/src/lib/libscf/common/scf_type.c b/usr/src/lib/libscf/common/scf_type.c index 8bd83a5c44..2866c15ff0 100644 --- a/usr/src/lib/libscf/common/scf_type.c +++ b/usr/src/lib/libscf/common/scf_type.c @@ -20,10 +20,10 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ +#include <assert.h> #include <repcache_protocol.h> #include "scf_type.h" #include <errno.h> @@ -31,6 +31,10 @@ #include <libscf_priv.h> #include <stdlib.h> #include <string.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <arpa/inet.h> +#include <netinet/in.h> #define UTF8_TOP_N(n) \ (0xff ^ (0xff >> (n))) /* top N bits set */ @@ -228,6 +232,67 @@ valid_fmri(const char *str) return (ret); } +/* + * check_prefix() + * Return 1 if the prefix is a valid IPv4 or IPv6 network prefix, 0 otherwise + */ +static int +check_net_prefix(const char *p, int max_len) +{ + char *end; + int len; + + len = strtol(p, &end, 10); + if (p == end || len < 0 || len > max_len) + return (0); + + return (1); +} + +/* + * Return 1 if the supplied IP address is valid, 0 otherwise. + */ +static int +valid_ip(int af, const char *str) +{ + void *unused[4]; + const char *addr = str; + char buf[INET6_ADDRSTRLEN]; /* enough for both IPv4 and IPv6 */ + char *net_prefix; + int buf_sz; + int plen; + + switch (af) { + case AF_INET: + buf_sz = INET_ADDRSTRLEN; + plen = 32; /* bit size of an IPv4 */ + break; + + case AF_INET6: + buf_sz = INET6_ADDRSTRLEN; + plen = 128; /* bit size of an IPv6 */ + break; + + default: + assert(0); + abort(); + } + + /* check network prefix for the IP address */ + if ((net_prefix = strchr(str, '/')) != NULL) { + if (check_net_prefix(++net_prefix, plen) == 0) + return (0); + + (void) strlcpy(buf, str, buf_sz); + if ((net_prefix = strchr(buf, '/')) != NULL) + *net_prefix = '\0'; + + addr = buf; + } + + return (inet_pton(af, addr, unused)); +} + rep_protocol_value_type_t scf_proto_underlying_type(rep_protocol_value_type_t t) { @@ -252,10 +317,12 @@ scf_proto_underlying_type(rep_protocol_value_type_t t) return (REP_PROTOCOL_SUBTYPE_USTRING); case REP_PROTOCOL_SUBTYPE_HOSTNAME: return (REP_PROTOCOL_SUBTYPE_HOST); - case REP_PROTOCOL_SUBTYPE_NETADDR_V4: + case REP_PROTOCOL_SUBTYPE_NETADDR: return (REP_PROTOCOL_SUBTYPE_HOST); + case REP_PROTOCOL_SUBTYPE_NETADDR_V4: + return (REP_PROTOCOL_SUBTYPE_NETADDR); case REP_PROTOCOL_SUBTYPE_NETADDR_V6: - return (REP_PROTOCOL_SUBTYPE_HOST); + return (REP_PROTOCOL_SUBTYPE_NETADDR); case REP_PROTOCOL_TYPE_INVALID: default: @@ -347,17 +414,20 @@ valid_encoded_value(rep_protocol_value_type_t t, const char *v) case REP_PROTOCOL_SUBTYPE_HOST: return (valid_encoded_value(REP_PROTOCOL_SUBTYPE_HOSTNAME, v) || - valid_encoded_value(REP_PROTOCOL_SUBTYPE_NETADDR_V4, v) || - valid_encoded_value(REP_PROTOCOL_SUBTYPE_NETADDR_V6, v)); + valid_encoded_value(REP_PROTOCOL_SUBTYPE_NETADDR, v)); case REP_PROTOCOL_SUBTYPE_HOSTNAME: /* XXX check for valid hostname */ return (valid_utf8(v)); + case REP_PROTOCOL_SUBTYPE_NETADDR: + return (valid_ip(AF_INET, v) || valid_ip(AF_INET6, v)); + case REP_PROTOCOL_SUBTYPE_NETADDR_V4: + return (valid_ip(AF_INET, v)); + case REP_PROTOCOL_SUBTYPE_NETADDR_V6: - /* XXX check for valid netaddr */ - return (valid_utf8(v)); + return (valid_ip(AF_INET6, v)); case REP_PROTOCOL_TYPE_INVALID: default: diff --git a/usr/src/lib/libscf/inc/libscf.h b/usr/src/lib/libscf/inc/libscf.h index e1df3a09fa..b3ded758bd 100644 --- a/usr/src/lib/libscf/inc/libscf.h +++ b/usr/src/lib/libscf/inc/libscf.h @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _LIBSCF_H @@ -85,7 +84,8 @@ typedef enum { SCF_TYPE_HOST = 300, SCF_TYPE_HOSTNAME, SCF_TYPE_NET_ADDR_V4, - SCF_TYPE_NET_ADDR_V6 + SCF_TYPE_NET_ADDR_V6, + SCF_TYPE_NET_ADDR } scf_type_t; typedef struct scf_time { diff --git a/usr/src/lib/libscf/inc/libscf_priv.h b/usr/src/lib/libscf/inc/libscf_priv.h index c26006370e..cd058c0f43 100644 --- a/usr/src/lib/libscf/inc/libscf_priv.h +++ b/usr/src/lib/libscf/inc/libscf_priv.h @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _LIBSCF_PRIV_H @@ -546,6 +545,13 @@ int scf_fastreboot_default_set_transient(boolean_t); */ int scf_is_compatible_type(scf_type_t, scf_type_t); +/* + * Check an array of services and enable any that don't have the + * "application/auto_enable" property set to "false", which is + * the interface to turn off this behaviour (see PSARC 2004/739). + */ +void _check_services(char **); + #ifdef __cplusplus } #endif diff --git a/usr/src/lib/libshare/nfs/libshare_nfs.h b/usr/src/lib/libshare/nfs/libshare_nfs.h index 3d4bd57793..f032791767 100644 --- a/usr/src/lib/libshare/nfs/libshare_nfs.h +++ b/usr/src/lib/libshare/nfs/libshare_nfs.h @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -118,7 +117,6 @@ extern boolean_t nfsl_errs_to_syslog; /* imported functions */ extern int exportfs(char *, struct exportdata *); -extern void _check_services(char **); extern int nfs_getseconfig_default(seconfig_t *); extern int nfs_getseconfig_byname(char *, seconfig_t *); extern bool_t nfs_get_root_principal(seconfig_t *, char *, caddr_t *); diff --git a/usr/src/lib/libshare/smb/libshare_smb.c b/usr/src/lib/libshare/smb/libshare_smb.c index 2fd55603fa..be6f6be2e2 100644 --- a/usr/src/lib/libshare/smb/libshare_smb.c +++ b/usr/src/lib/libshare/smb/libshare_smb.c @@ -43,6 +43,7 @@ #include <pwd.h> #include <limits.h> #include <libscf.h> +#include <libscf_priv.h> #include <strings.h> #include "libshare_smb.h" #include <rpcsvc/daemon_utils.h> |