sanity check for reverse lookup in idmap

Gerald (Jerry) Carter jerry at samba.org
Fri Jul 25 15:34:46 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Folks,

Are these really necessary?
[from idmap+_tdb.c:db_get_id_from_sid()]


	iderr = internal_get_id_from_sid(id, id_type, sid);
	if (iderr == GET_ID_FROM_SID_OK) {
		DOM_SID sid_tmp;
		ret = internal_get_sid_from_id(&sid_tmp, *id, *id_type);
		if (NT_STATUS_IS_OK(ret)) {
			if (!sid_equal(&sid_tmp, sid)) {
				return NT_STATUS_UNSUCCESSFUL;
			}
		}


2 lookups for one call?  I know why we are doing it, but am finding it 
hard to convince myself that the overhead is warranted....




cheers, jerry
 ----------------------------------------------------------------------
 Hewlett-Packard            ------------------------- http://www.hp.com
 SAMBA Team                 ---------------------- http://www.samba.org
 GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
 "You can never go home again, Oatman, but I guess you can shop there."  
                            --John Cusack - "Grosse Point Blank" (1997)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/IU4aIR7qMdg1EfYRAuK0AJ0ZWGis9hGkXWFHjiU5RfqLdq7MWACfSdpK
YubVVSEvx1fmDUomHBWJWrs=
=z4mL
-----END PGP SIGNATURE-----




More information about the samba-technical mailing list