Andrew Tridgell [Sun, 22 Jul 2001 07:38:32 +0000 (07:38 +0000)]
changed the iconv interface to go via ucs2 for all conversions. This
fixes some problems wih some character sets and allows for using
internal charsets in conjunction with ionv charsets
this makes us slower but more correct. speed will come later.
Andrew Bartlett [Sat, 21 Jul 2001 02:23:19 +0000 (02:23 +0000)]
This patch fixes up a few issues where we would do lookups in the local system
on username we already know are perfectly valid, and in their final form. In
particular we don't want to do a lookup for DOMAIN\nobody, it just does not
make sense, nor should we do map_username and the like if the username is as
specified in the vuid - we have done it already.
Tim Potter [Fri, 20 Jul 2001 01:35:00 +0000 (01:35 +0000)]
Changed the cli_lsa_lookup_sids() function to unpack the domain and user or
group using rpcstr_pull_unistr2_fstring rather than pull_ascii_fstring (!!)
Tim Potter [Fri, 20 Jul 2001 01:32:56 +0000 (01:32 +0000)]
It looks like the rpc client code in libsmb hasn't been converted to the
new internal string stuff. The main problem is that some unicode strings
are null terminated and some aren't. There's no rhyme or reason to it -
some pipes have 99% of the strings terminated and some have 99%
unterminated. To avoid having to actually know the termination policy, I
propose a set of functions that take a UNISTR2* and use the length
contained there.
Added rpcstr_pull_unistr2_string() function to convert a unicode string of
dubious termination to a fstring.
Tim Potter [Thu, 19 Jul 2001 09:18:23 +0000 (09:18 +0000)]
Merged across rewritten version of winbindd_kill_connections(). This now
works much better with trusted domains whose DCs cannot be reached.
I'm pretty impressed with how much faster winbindd is in HEAD rather than
TNG. A lot fewer unecessary name lookups are performed and it feels a lot
zippier now.
Andrew B and I were commiting the same fix at the same time in different
trees. This change simply brings HEAD and 2.2 in line with one another.
Otherwise the code would be differnt but the meaning would be the same,
which is awkward.
Chris 'fifty-seven commits per line changed' Hertel -)-----
Andrew Bartlett [Tue, 10 Jul 2001 17:02:02 +0000 (17:02 +0000)]
This fixes security=domain, which has been broke since the big charset
changeover. For my own sainity I have created a new function to fill out both
the header and buffer for a string in an RPC struct. This DOES NOT take a
length argument, only the actual string to be placed.
The RPC code is currently littered with code that does init_uni_hdr() followed
immidiatly by init_unistr2(), and often the length argument is wrong. (It was
for the code I changed, even before the charset stuff). Another bug where we
made strings AT LEAST MAX_UNICODE_LEN long hid this bug.
This works for loopback connections to Samba, and can't be any more broke than
it was before :-). (We had double and revese conversions, fun...).
In particular this makes us multibyte complient.
In any case, if there are no objections I will slowly convert other bits of
code to the same system.
Fix from John Malmberg. When I added the additional information to the
debug block that reports multiple query responses I did not notice that
the local answer_ip variable was only selectively set.
Andrew Tridgell [Tue, 10 Jul 2001 02:53:48 +0000 (02:53 +0000)]
much better handling of broken DNS servers
we no longer lookup our own name when we create a socket in
open_socket_in(). That makes things work much better with the
broken DNS server at VA
Andrew Tridgell [Tue, 10 Jul 2001 02:28:17 +0000 (02:28 +0000)]
added winbind_exclude_domain() so smbd can tell the winbind client
code not to do lookups for a particular domain. This allows winbind to
operate on a Samba PDC
Andrew Bartlett [Sun, 8 Jul 2001 13:02:16 +0000 (13:02 +0000)]
Fix the loading of configuration files using the include syntax.
We had a problem where if a % macro in the smb.conf could be ignored if the
various files it pointed to had the same time-stamp.
This changes the code to insted check that the both the time-stamp and the
substituted filename are the same over each change.
This was picked up only becouse the build-farm automaticly generates its config
files, and hence gets identical timestamps.
(Why this doesn't happen all the time I'm not entirly sure, somthing to do with
the 'test' paramater to reload_services(), but this fixes this problem).
Andrew Bartlett [Sat, 7 Jul 2001 08:45:39 +0000 (08:45 +0000)]
Add a new paramater: add machine script
This allows the administrator to define different scripts for adding unix users
and automaticly adding machines. If it is not defined, it falls back to the
value of 'add user script'.
Andrew Tridgell [Fri, 6 Jul 2001 04:08:24 +0000 (04:08 +0000)]
fixed bug where we looked at the first byte of a password to determine
if the password is blank. That ain't valid with encrypted passwords!
Jeremy, this changes the semantics of session setup. We no longer
automatically set guest=True when the client happens to choose their
username == the guest username. Instead we rely on the map_to_guest
code. I'm pretty sure this is now the right thing, but please look at
it carefully before putting it in 2.2
This is the bug that was causing the build farm to sometimes
fail. Basically we failed every 256 attempts - ie. when the first byte
of the encrypted password happened to be 0
Andrew Tridgell [Thu, 5 Jul 2001 10:33:10 +0000 (10:33 +0000)]
this fixes the failure of MS office on VFAT partitions on Linux
The problem is that ftruncate can't expand on VFAT, but it can on
ext2. That means our autoconf test is useless. I have recoded it to
use the alternative to ftruncate when then sys_ftruncate fails.