[389-users] Problem with plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

We have done a plugin that dynamically change some attributes of the
search results. The main code is like this:


int smbhack_hook( Slapi_PBlock* pb ) {
	// ...
	Slapi_Entry** s_entradas = NULL;
	Slapi_PBlock* pbi = NULL;

	// ...
	rv = slapi_pblock_get(
		pb,
		SLAPI_SEARCH_STRFILTER,
		&s_strfilter
	);
	if (rv == -1) {
		slapi_unlock_mutex(cfg_lock);
		return LDAP_OP_IGNORED;
	}

	// ...
	slapi_search_internal_set_pb(
		pbi,
		s_dn,                      // Base
		s_scope,                   // Ambito
		s_strfilter,               // Filtro
		s_attrs,                   // Atributos buscados
		s_attrsonly,               // Flag de seleccion
		s_controls,                // Controls
		s_uid,                     // DN vs uid
		plugin_id,                 // ComponentId
		SLAPI_OP_FLAG_NEVER_CHAIN  // Flags
		);

	// ...
	rv = slapi_pblock_get(
		pbi,
		SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
		&s_entradas
	);

	// ...
	if (s_entradas == NULL || s_entradas[0] == NULL) {
		slapi_unlock_mutex(cfg_lock);
		destruir_estructura_dn(pila_dn_invocador);
		slapi_pblock_destroy(pbi);
		return LDAP_OP_IGNORED;
	}

	// ...
}

The problem is thar when doing a search with this filter:

(&(ou:dn:=People)(uid=myuid)(objectClass=sambaSamAccount))

the method slapi_pblock_getfor the attribute
SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES returns s_entradas != null, but if I
do a search with this filter:

(&(|(ou:dn:=Computers)(ou:dn:=People))(uid=myuid)(objectClass=sambaSamAccount))

s_entradas is null or s_entradas[0] is null and the operation is ignored.

What could the reason?

If anyone can be useful, this plugin simulates a samba domain trust,
making some users of other organization in a group, change dinamycally
their sambasid to make them a valid user in the target windows domain.
--
389 users mailing list
389-users@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-users



[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux