diff options
author | Anurag S. Maskey <Anurag.Maskey@Sun.COM> | 2010-02-25 22:05:58 -0500 |
---|---|---|
committer | Anurag S. Maskey <Anurag.Maskey@Sun.COM> | 2010-02-25 22:05:58 -0500 |
commit | 6ba597c56d749c61b4f783157f63196d7b2445f0 (patch) | |
tree | f723e502e6a07690117ebc91df6130954ea29fb3 /usr/src/lib/libdladm | |
parent | 07377e5e51e2e8f6251029c3b5808547d9d1c54d (diff) | |
download | illumos-joyent-6ba597c56d749c61b4f783157f63196d7b2445f0.tar.gz |
PSARC/2008/532 NWAM Phase 1
PSARC/2009/577 Network Auto-Magic (NWAM) Phase 1 Updates
PSARC/2010/049 Network Auto-Magic (NWAM) Phase 1 Updates part 2
4087814 User friendly utility wanted for network config, able to add network interfaces.
6509720 support configuration using DHCP "inform" and static IP address
6553627 network/physical:default and network/physical:nwam should be mutually-exclusive (perhaps a property)
6609581 nwam does not start the dns/client service after configuring the network
6664072 nwam profiles should include name service configuration properties
6723947 setting static MAC address should be possible
6794043 NWAM needs more complete profile support
6914190 Support for unmanaged network interfaces in NWAM - hands off
6921971 nwamd fails to run teardown/net-svc after suspend/resume
--HG--
rename : usr/src/cmd/cmd-inet/lib/nwamd/interface.c => usr/src/cmd/cmd-inet/lib/nwamd/ncu_ip.c
rename : usr/src/cmd/cmd-inet/lib/nwamd/wireless.c => usr/src/cmd/cmd-inet/lib/nwamd/ncu_phys.c
rename : usr/src/cmd/cmd-inet/lib/nwamd/events.c => usr/src/cmd/cmd-inet/lib/nwamd/routing_events.c
rename : usr/src/cmd/cmd-inet/lib/nwamd/functions.h => usr/src/cmd/cmd-inet/lib/nwamd/util.h
Diffstat (limited to 'usr/src/lib/libdladm')
-rw-r--r-- | usr/src/lib/libdladm/common/libdladm.c | 20 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/libdlflow.c | 4 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/secobj.c | 7 |
3 files changed, 18 insertions, 13 deletions
diff --git a/usr/src/lib/libdladm/common/libdladm.c b/usr/src/lib/libdladm/common/libdladm.c index 8939d23331..ad23a1a25b 100644 --- a/usr/src/lib/libdladm/common/libdladm.c +++ b/usr/src/lib/libdladm/common/libdladm.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -724,15 +724,19 @@ i_dladm_rw_db(dladm_handle_t handle, const char *db_file, mode_t db_perms, if (!writeop || status != DLADM_STATUS_OK) goto done; + /* Set permissions on file to db_perms */ + if (fchmod(nfd, db_perms) < 0) { + status = dladm_errno2status(errno); + goto done; + } + /* - * Configuration files need to be owned by the 'dladm' user. - * If we are invoked by root, the file ownership needs to be fixed. + * Configuration files need to be owned by the 'dladm' user and + * 'netadm' group. */ - if (getuid() == 0 || geteuid() == 0) { - if (fchown(nfd, UID_DLADM, GID_SYS) < 0) { - status = dladm_errno2status(errno); - goto done; - } + if (fchown(nfd, UID_DLADM, GID_NETADM) < 0) { + status = dladm_errno2status(errno); + goto done; } if (fflush(nfp) == EOF) { diff --git a/usr/src/lib/libdladm/common/libdlflow.c b/usr/src/lib/libdladm/common/libdlflow.c index 0f9a3e0af5..235b948504 100644 --- a/usr/src/lib/libdladm/common/libdlflow.c +++ b/usr/src/lib/libdladm/common/libdlflow.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -57,7 +57,7 @@ #define DLADM_FLOW_DB_PERMS S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH #define DLADM_FLOW_DB_OWNER UID_DLADM -#define DLADM_FLOW_DB_GROUP GID_SYS +#define DLADM_FLOW_DB_GROUP GID_NETADM #define BLANK_LINE(s) ((s[0] == '\0') || (s[0] == '#') || (s[0] == '\n')) #define MAXLINELEN 1024 diff --git a/usr/src/lib/libdladm/common/secobj.c b/usr/src/lib/libdladm/common/secobj.c index 07f02ac996..fec08ca930 100644 --- a/usr/src/lib/libdladm/common/secobj.c +++ b/usr/src/lib/libdladm/common/secobj.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -543,8 +543,9 @@ process_secobj_db(dladm_handle_t handle, void *arg, FILE *fp, FILE *nfp) return (status); } -#define SECOBJ_RW_DB(handle, statep, writeop) \ - (i_dladm_rw_db(handle, "/etc/dladm/secobj.conf", S_IRUSR | S_IWUSR, \ +#define SECOBJ_RW_DB(handle, statep, writeop) \ + (i_dladm_rw_db(handle, "/etc/dladm/secobj.conf", \ + S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, \ process_secobj_db, (statep), (writeop))) static dladm_status_t |