On Wed, Oct 17, 2012 at 04:35:17PM +0300, Ovidiu Barzan
wrote:> Is there an API function for C as an alternative to calling "net ads
> join ...." from shell?
> I'm trying not to use a system call like popen("net ads join
...","r");
> because there are some problems with finding the reason for a failed join:
> - Linux exit codes are limited to 8 bites so the net command return value
> is of no help.
> - Parsing the command output seems unreliable since the text could change
> from one version to another.
You might try libnet_Join() from source3/libnet/libnet_join.h.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de