<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source3/lib/netapi/netapi_net.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>netapi: Pass net's cmdline credentials to libnetapi_net_init()</title>
<updated>2023-09-11T02:42:41+00:00</updated>
<author>
<name>Samuel Cabrero</name>
<email>scabrero@samba.org</email>
</author>
<published>2023-09-07T12:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=8cdb4f2985075b12201d3295f640bddcfbfe5962'/>
<id>8cdb4f2985075b12201d3295f640bddcfbfe5962</id>
<content type='text'>
Avoid unnecessary credentials allocation and initialization by passing the
net's cmdline creds to libnetapi_net_init() directly.

Fixes the problem of running cli_credentials_guess() (which runs password
callbacks) twice, one for the net's cmdline creds and a second time for the
creds initialized in libnetapi_net_init(), just to override them immediately
after.

Example:

$ export PASSWD_FD=0
$ ./bin/net offlinejoin composeodj &lt;...&gt;
foo
bar

Password is read from STDIN twice.

Signed-off-by: Samuel Cabrero &lt;scabrero@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid unnecessary credentials allocation and initialization by passing the
net's cmdline creds to libnetapi_net_init() directly.

Fixes the problem of running cli_credentials_guess() (which runs password
callbacks) twice, one for the net's cmdline creds and a second time for the
creds initialized in libnetapi_net_init(), just to override them immediately
after.

Example:

$ export PASSWD_FD=0
$ ./bin/net offlinejoin composeodj &lt;...&gt;
foo
bar

Password is read from STDIN twice.

Signed-off-by: Samuel Cabrero &lt;scabrero@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netapi: Pass loadparm_context to libnetapi_net_init()</title>
<updated>2023-09-11T02:42:41+00:00</updated>
<author>
<name>Samuel Cabrero</name>
<email>scabrero@samba.org</email>
</author>
<published>2023-09-07T12:34:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5cad827810975084f061f56548006fdd2d15dc7b'/>
<id>5cad827810975084f061f56548006fdd2d15dc7b</id>
<content type='text'>
The net's tool cmdline lp_ctx can be reused, no need to init a new one except
for external library users.

Signed-off-by: Samuel Cabrero &lt;scabrero@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The net's tool cmdline lp_ctx can be reused, no need to init a new one except
for external library users.

Signed-off-by: Samuel Cabrero &lt;scabrero@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3-netapi Add libnetapi_net_init(), don't double-init common Samba subsystems</title>
<updated>2010-11-24T07:37:04+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2010-11-21T09:40:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=88d020ade07bfe5cd7570b8c9b80a162adb39891'/>
<id>88d020ade07bfe5cd7570b8c9b80a162adb39891</id>
<content type='text'>
The issue here is that libnet and net were both trying to load the
smb.conf files, the case tables and set the debug levels.  The set of
the debug levels caused problems, because it would force the level to
0, not (say) 10 as requested on the command line.

This regression was apparently introduced in
cf4de8ec2c8df2ceabbe3d836d296b058e7b19fb when eliminating
AllowDebugChange.

Andrew Bartlett
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The issue here is that libnet and net were both trying to load the
smb.conf files, the case tables and set the debug levels.  The set of
the debug levels caused problems, because it would force the level to
0, not (say) 10 as requested on the command line.

This regression was apparently introduced in
cf4de8ec2c8df2ceabbe3d836d296b058e7b19fb when eliminating
AllowDebugChange.

Andrew Bartlett
</pre>
</div>
</content>
</entry>
</feed>
