IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
These functions should be called before the subsystem is used. That
should be done when the subsystem is initialised or first used.
</para>
</sect2>
<sect2>
<title>Shared modules</title>
<para>
If a subsystem needs a certain backend, it should check if it has
already been registered. If the backend hasn't been registered already,
the subsystem should call smb_probe_module(char *subsystem, char *backend).
This function tries to load the correct module from a certain path
($LIBDIR/subsystem/backend.so). If the first character in 'backend'
is a slash, smb_probe_module() tries to load the module from the
absolute path specified in 'backend'.
</para>
<para>After smb_probe_module() has been executed, the subsystem
should check again if the module has been registered.
</para>
</sect2>
</sect1>
<sect1>
<title>Writing modules</title>
<para>
Each module has an initialisation function. For modules that are
included with samba this name is '<replaceable>subsystem</replaceable>_<replaceable>backend</replaceable>_init'. For external modules (that will never be built-in, but only available as a module) this name is always 'init_module'. (In the case of modules included with samba, the configure system will add a #define subsystem_backend_init() init_module()).
The prototype for these functions is:
</para>
<para><programlisting>
NTSTATUS init_module(void);
</programlisting></para>
<para>This function should call one or more
registration functions. The function should return NT_STATUS_OK on success and
NT_STATUS_UNSUCCESSFUL or a more useful nt error code on failure.</para>
<para>For example, pdb_ldap_init() contains: </para>