summaryrefslogtreecommitdiff
path: root/usr/src/lib/liblaadm/common/liblaadm.c
diff options
context:
space:
mode:
authorxc151355 <none@none>2006-11-20 22:51:46 -0800
committerxc151355 <none@none>2006-11-20 22:51:46 -0800
commit0ba2cbe97e0678a691742f98d2532caed0a2c4aa (patch)
tree999e927888ff26967f593246afc931402e17b50e /usr/src/lib/liblaadm/common/liblaadm.c
parent0c64a9b435314788e185507d40ef9fae71507f5a (diff)
downloadillumos-joyent-0ba2cbe97e0678a691742f98d2532caed0a2c4aa.tar.gz
PSARC/2006/406 WiFi for GLDv3
PSARC/2006/517 WiFi for GLDv3 Addendum PSARC/2006/623 WiFi for GLDv3 Addendum #2 6253476 dladm exec_attr entry doesn't allow show-link to work 6362391 ath driver needs to be updated to use the latest HAL 6364198 system crashes if multiple ath driver instances are modunload'ed 6367259 ath driver needs to support GLDv3 6407181 ath driver panics in ath_rate_update function 6421983 ath driver needs shared_key authmode support 6472427 ath driver causes watchdog timeout error 6484943 integrate WiFi/GLDv3 --HG-- rename : usr/src/uts/common/io/ath/ath_ieee80211.c => deleted_files/usr/src/uts/common/io/ath/ath_ieee80211.c rename : usr/src/uts/common/io/ath/ath_ieee80211.h => deleted_files/usr/src/uts/common/io/ath/ath_ieee80211.h rename : usr/src/uts/common/io/ath/ath_wificonfig.c => deleted_files/usr/src/uts/common/io/ath/ath_wificonfig.c
Diffstat (limited to 'usr/src/lib/liblaadm/common/liblaadm.c')
-rw-r--r--usr/src/lib/liblaadm/common/liblaadm.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/usr/src/lib/liblaadm/common/liblaadm.c b/usr/src/lib/liblaadm/common/liblaadm.c
index 0beeee27da..3b23a5999d 100644
--- a/usr/src/lib/liblaadm/common/liblaadm.c
+++ b/usr/src/lib/liblaadm/common/liblaadm.c
@@ -52,31 +52,31 @@
* <db-file> ::= <groups>*
* <group> ::= <key> <sep> <policy> <sep> <nports> <sep> <ports> <sep>
* <mac> <sep> <lacp-mode> <sep> <lacp-timer>
- * <sep> ::= ' ' | '\t'
- * <key> ::= <number>
+ * <sep> ::= ' ' | '\t'
+ * <key> ::= <number>
* <nports> ::= <number>
* <ports> ::= <port> <m-port>*
* <m-port> ::= ',' <port>
- * <port> ::= <devname>
+ * <port> ::= <devname>
* <devname> ::= <string>
* <port-num> ::= <number>
* <policy> ::= <pol-level> <m-pol>*
* <m-pol> ::= ',' <pol-level>
* <pol-level> ::= 'L2' | 'L3' | 'L4'
- * <mac> ::= 'auto' | <mac-addr>
+ * <mac> ::= 'auto' | <mac-addr>
* <mac-addr> ::= <hex> ':' <hex> ':' <hex> ':' <hex> ':' <hex> ':' <hex>
* <lacp-mode> ::= 'off' | 'active' | 'passive'
* <lacp-timer> ::= 'short' | 'long'
*/
#define LAADM_DEV "/devices/pseudo/aggr@0:" AGGR_DEVNAME_CTL
-#define LAADM_DB "/etc/aggregation.conf"
-#define LAADM_DB_TMP "/etc/aggregation.conf.new"
+#define LAADM_DB "/etc/dladm/aggregation.conf"
+#define LAADM_DB_TMP "/etc/dladm/aggregation.conf.new"
#define LAADM_DB_LOCK "/tmp/aggregation.conf.lock"
#define LAADM_DB_PERMS S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define LAADM_DB_OWNER 0
-#define LAADM_DB_GROUP 1
+#define LAADM_DB_OWNER 15 /* "dladm" UID */
+#define LAADM_DB_GROUP 3 /* "sys" GID */
/*
* The largest configurable aggregation key. Because by default the key is
@@ -866,11 +866,13 @@ i_laadm_walk_rw_db(int (*fn)(void *, laadm_grp_attr_db_t *),
attr.lt_ports = NULL;
}
- if (fchmod(nfd, LAADM_DB_PERMS) == -1)
- goto failed;
+ if (getuid() == 0 || geteuid() == 0) {
+ if (fchmod(nfd, LAADM_DB_PERMS) == -1)
+ goto failed;
- if (fchown(nfd, LAADM_DB_OWNER, LAADM_DB_GROUP) == -1)
- goto failed;
+ if (fchown(nfd, LAADM_DB_OWNER, LAADM_DB_GROUP) == -1)
+ goto failed;
+ }
if (fflush(nfp) == EOF)
goto failed;