[PATCH] _lsa_lookup_names return value overwritten
Jerome Borsboom
j.borsboom at erasmusmc.nl
Wed May 26 13:05:57 GMT 2004
As with _lsa_lookup_sids in my previous patch, _lsa_lookup_names
writes over previously set return values as well. The patch
below corrects this.
http://lists.samba.org/archive/samba-technical/2004-May/035819.html
Greetz,
Jerome Borsboom
--- samba-3.0.4/source/rpc_server/srv_lsa_nt.c 2004-04-20 22:42:56.000000000 +0200
+++ samba-3.0.4.new/source/rpc_server/srv_lsa_nt.c 2004-05-26 14:50:10.996293657 +0200
@@ -717,12 +717,12 @@
/* set up the LSA Lookup RIDs response */
init_lsa_rid2s(ref, rids, num_entries, names, &mapped_count, p->endian);
- if (mapped_count == 0)
- r_u->status = NT_STATUS_NONE_MAPPED;
- else if (mapped_count != num_entries)
- r_u->status = STATUS_SOME_UNMAPPED;
- else
- r_u->status = NT_STATUS_OK;
+ if (NT_STATUS_IS_OK(r_u->status)) {
+ if (mapped_count == 0)
+ r_u->status = NT_STATUS_NONE_MAPPED;
+ else if (mapped_count != num_entries)
+ r_u->status = STATUS_SOME_UNMAPPED;
+ }
init_reply_lookup_names(r_u, ref, num_entries, rids, mapped_count);
return r_u->status;
--
Ir. Jerome Borsboom
Erasmus MC
Room Ee2302
P.O. Box 1738
3000 DR Rotterdam
The Netherlands
Tel: +31 10 4087474
Fax: + 31 10 4089445
More information about the samba-technical
mailing list