diff options
author | Jordan Brown <Jordan.Brown@Sun.COM> | 2009-11-05 14:34:36 -0800 |
---|---|---|
committer | Jordan Brown <Jordan.Brown@Sun.COM> | 2009-11-05 14:34:36 -0800 |
commit | bbf6f00c25b6a2bed23c35eac6d62998ecdb338c (patch) | |
tree | 8cf72fd47362b5b0da2ffe9be7fe7726a3d24426 /usr/src/cmd/idmap/idmapd/server.c | |
parent | d95ac3ffcdcc13296bb4c53f621f72c0535f32c3 (diff) | |
download | illumos-gate-bbf6f00c25b6a2bed23c35eac6d62998ecdb338c.tar.gz |
6747532 ns_lookup_bypid spams syslog with too many messages
6888836 Not listing all files in a directory of a CIFS share in Windows XP
6812570 Trans2 is missing pass-through levels: FILE_RENAME_INFORMATION (and others)
6888827 Add Unicode codepage support
6865488 libadutils: leak in ldap_lookup_domains_in_forest()
6888708 idmapd crashing periodically. Need cores analyzed.
6891342 invalid, redundant SQL in rule WHERE expressions
6891767 minor cleanups in idmap
6892544 Panic occurred at smb_node_ref+0x7f(ffffffd612297310)
--HG--
rename : usr/src/uts/common/smbsrv/cifs.h => usr/src/uts/common/smbsrv/smb.h
Diffstat (limited to 'usr/src/cmd/idmap/idmapd/server.c')
-rw-r--r-- | usr/src/cmd/idmap/idmapd/server.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/usr/src/cmd/idmap/idmapd/server.c b/usr/src/cmd/idmap/idmapd/server.c index 8c26069a9f..59d53a2a98 100644 --- a/usr/src/cmd/idmap/idmapd/server.c +++ b/usr/src/cmd/idmap/idmapd/server.c @@ -560,7 +560,6 @@ idmap_list_mappings_1_svc(int64_t lastrowid, uint64_t limit, int32_t flag, time_t curtime; (void) memset(result, 0, sizeof (*result)); - lbuf[0] = rbuf[0] = 0; /* Current time */ errno = 0; @@ -588,6 +587,8 @@ idmap_list_mappings_1_svc(int64_t lastrowid, uint64_t limit, int32_t flag, if (limit > 0) (void) snprintf(lbuf, sizeof (lbuf), "LIMIT %" PRIu64, limit + 1ULL); + else + lbuf[0] = '\0'; (void) snprintf(rbuf, sizeof (rbuf), "rowid > %" PRIu64, lastrowid); @@ -704,7 +705,6 @@ idmap_list_namerules_1_svc(idmap_namerule rule, uint64_t lastrowid, { sqlite *db = NULL; - char w2ubuf[15], u2wbuf[15]; char lbuf[30], rbuf[30]; char *sql = NULL; char *expr = NULL; @@ -712,7 +712,6 @@ idmap_list_namerules_1_svc(idmap_namerule rule, uint64_t lastrowid, idmap_retcode retcode; (void) memset(result, 0, sizeof (*result)); - lbuf[0] = rbuf[0] = 0; result->retcode = validate_rule(&rule); if (result->retcode != IDMAP_SUCCESS) @@ -727,22 +726,6 @@ idmap_list_namerules_1_svc(idmap_namerule rule, uint64_t lastrowid, if (result->retcode != IDMAP_SUCCESS) goto out; - result->retcode = IDMAP_ERR_INTERNAL; - - w2ubuf[0] = u2wbuf[0] = 0; - if (rule.direction == IDMAP_DIRECTION_BI) { - (void) snprintf(w2ubuf, sizeof (w2ubuf), "AND w2u_order > 0"); - (void) snprintf(u2wbuf, sizeof (u2wbuf), "AND u2w_order > 0"); - } else if (rule.direction == IDMAP_DIRECTION_W2U) { - (void) snprintf(w2ubuf, sizeof (w2ubuf), "AND w2u_order > 0"); - (void) snprintf(u2wbuf, sizeof (u2wbuf), - "AND (u2w_order = 0 OR u2w_order ISNULL)"); - } else if (rule.direction == IDMAP_DIRECTION_U2W) { - (void) snprintf(w2ubuf, sizeof (w2ubuf), - "AND (w2u_order = 0 OR w2u_order ISNULL)"); - (void) snprintf(u2wbuf, sizeof (u2wbuf), "AND u2w_order > 0"); - } - result->retcode = gen_sql_expr_from_rule(&rule, &expr); if (result->retcode != IDMAP_SUCCESS) goto out; @@ -753,6 +736,8 @@ idmap_list_namerules_1_svc(idmap_namerule rule, uint64_t lastrowid, if (limit > 0) (void) snprintf(lbuf, sizeof (lbuf), "LIMIT %" PRIu64, limit + 1ULL); + else + lbuf[0] = '\0'; (void) snprintf(rbuf, sizeof (rbuf), "rowid > %" PRIu64, lastrowid); @@ -763,8 +748,8 @@ idmap_list_namerules_1_svc(idmap_namerule rule, uint64_t lastrowid, sql = sqlite_mprintf("SELECT rowid, is_user, is_wuser, windomain, " "winname_display, is_nt4, unixname, w2u_order, u2w_order " "FROM namerules WHERE " - " %s %s %s %s %s;", - rbuf, expr, w2ubuf, u2wbuf, lbuf); + " %s %s %s;", + rbuf, expr, lbuf); if (sql == NULL) { result->retcode = IDMAP_ERR_MEMORY; |