git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ff8838
)
nsswitch: make the wbcSidsToUnixIds() parser more robust
author
Andrew Tridgell
<tridge@samba.org>
Tue, 26 Jul 2011 01:01:36 +0000
(11:01 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Thu, 8 Sep 2011 13:09:54 +0000
(15:09 +0200)
this allows it to handle new types of responses
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
nsswitch/libwbclient/wbc_idmap.c
patch
|
blob
|
history
diff --git
a/nsswitch/libwbclient/wbc_idmap.c
b/nsswitch/libwbclient/wbc_idmap.c
index ad3cfe67709adcc5cca120c5dc66030d76bb3a59..5325dbe5ce531680afc23e3f1c53be9d6847e1f2 100644
(file)
--- a/
nsswitch/libwbclient/wbc_idmap.c
+++ b/
nsswitch/libwbclient/wbc_idmap.c
@@
-372,10
+372,10
@@
wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids,
break;
default:
id->type = WBC_ID_TYPE_NOT_SPECIFIED;
- q =
p
;
+ q =
strchr(p, '\n')
;
break;
};
- if (q[0] != '\n') {
+ if (q
== NULL || q
[0] != '\n') {
goto wbc_err_invalid;
}
p = q+1;