1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

13472 Commits

Author SHA1 Message Date
Jeremy Allison
188e1daaff Avoid mb conversion overflow when sending an announcement.
Jeremy.
-
Jeremy Allison
834d816caf Use "unix netbios name" type unstring - 64 bytes long to manipulate netbios
names in nmbd. Allows conversion from dos codepage mb strings (ie. SJIS) to
expand to utf8 size on read.
Jeremy.
-
Gerald Carter
12f3f0268c removing extra comma in --with-fhs -
Gerald Carter
b1115c0fc5 include swatdir in 'make showlayout' -
Gerald Carter
26681cd2a1 fix byte ordering problem when storing the updating pid for the lpq cache; was causing an abort in process_exists() on solaris -
Volker Lendecke
9fa2c40452 When trying to remove a user from a group, winbind should be informed
about the user and group...

Volker
-
Tim Potter
cc9765ce97 Use possessive in message asking for user's password. -
Jeremy Allison
d7cf64b1e4 Ensure we don't truncate strcmps to nstring anymore...
Jeremy.
-
Jeremy Allison
b4ea493599 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
-
Jeremy Allison
966e49a48c First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c
so it's readable.
Jeremy.
-
Herb Lewis
0375dace24 if we are truncating to the . we need to start at the beginning in case
there are multiple "."'s in the name.

This code is protected with an #ifdef TRUNCATE_NETBIOS_NAME and this
is #define'd to 1 directly above. Should we also get rid of the #ifdef?
-
Jeremy Allison
29909ce26a Fix from Robert.Dahlem@gmx.net (Robert Dahlem) for bugid #1048
when mangled names are turned off.
Jeremy.
-
Alexander Bokovoy
83dac6571f Fix problems with very long filenames in both smbd and smbclient.
It appears that we pass filename through resolve_wildcards() as pstring and use fstring temporary buffer there.
As result, a long filename in unix charset (UTF-8 by default) can easily expand over 255 bytes while
Windows is able to send to us such names (e.g. Japanese name of ~190 mb chars) which we unable to process through
this small fstring buffer. Tested with W2K and smbclient, Japanese and Cyrillics.
-
Alexander Bokovoy
9acd46ab46 Fix build after Jeremy -- yet another place where convert_string() wasn't updated -
Alexander Bokovoy
e1d0b8fc7b Fix string overflow due to wrong size calculation -
Jeremy Allison
2979c3e388 Allow msdfs symlink syntax to be more forgiving (it took me ages to remember
what it was :-). Allow msdfs links to now look like UNC paths : eg.
sym_link -> msdfs://server/share/path/in/share
or :
sym_link -> msdfs:\\server\share\path\in\share
Jeremy.
-
Jeremy Allison
7b96765c23 Restore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
boolean parameter that allows broken iconv conversions to work. Gets rid of the
nasty errno checks in mangle_hash2 and check_path_syntax and allows correct
return code checking.
Jeremy.
-
Jim McDonough
d275c0e384 Get MungedDial actually working with full TS strings in it for pdb_ldap.
I know this isn't pretty, but neither was our assumption that all strings
from the directory fit inside a pstring.  There was no way this worked
before will all versions of usrmgr (for example, the only version of
mine that has the TS Confic button).
-
Herb Lewis
9ea0560b0b add missing #ifdef HAVE_BICONV stuff -
Gerald Carter
bc6992c4bf BUG 1088: patch from SATOH Fumiyasu <fumiya@miraclinux.com> -- use strchr_m() for query_host (smbclient -L) -
Jeremy Allison
28f1e21c58 Ensure we use check_path_syntax() to pull out DFS paths.
Jeremy
-
Jeremy Allison
74722f2865 Fix processing of pathnames with embedded '\\' characters (0x5c) in CP932
character set. Because of the allowing of "broken conversions" for people
who have broken iconv libraries we can't rely on the return from convert_string()
to be valid - we must check errno instead. This is ripe for revisiting at
some stage. I prefer adding a bool parameter to all convert_string_XX varients
to specify if we will allow broken conversions or not. With "allow_broken_conversions"
set to false we could then rely on the return from convert_string rather than
checking errno.
Jeremy.
-
Herb Lewis
e6c2d9a3f7 another typo -
Jeremy Allison
e2709f99fc Moving towards getting msdfs working again (this looks like it was broken
in 3.0.2a actually). We now send a correct referral back, but the client
refuses to follow it... Not sure why. Will do more tests.. Maybe unicode
character count is wrong (it looks it).
Jeremy.
-
Jeremy Allison
80fde09fc4 Formatting reformat before I start to change anything here.
Jeremy.
-
Herb Lewis
2367d988ae fix typo for tag in proto file -
Jeremy Allison
42175b4518 Fix dfs referrals - don't use check_path_syntax. Also use mb char calls in
dfs code.
Jeremy.
-
Rafal Szczesniak
3e57c2c685 Yet another '\n' termination of debug message.
rafal
-
Rafal Szczesniak
2a7dd46943 Fix to debug message lacking termination with '\n'.
rafal
-
Gerald Carter
11fc4da07f fix build with gcc 2.96 and --with-developer -
Andrew Bartlett
a893a324f3 Given how core this code is, I figure it should have it's own testsuite.
Big thanks to tpot and mbp for showing how easy it can be to write a simple
unit test, and for providing the STF.

This also changes the strstr_m() code to use strstr_w() (avoiding
duplication) and fixes it so that it passes the STF.

(We now always restart before doing the unicode run, until sombody can
show me why the testsuite is wrong).

Andrew Bartlett
-
Andrew Bartlett
44d304f84c JRA's recent strstr_m work really badly broke our string_sub code.
For example:

strstr_m("%v foo bar", "%v") would fail...

only strstr_m("foo %v", "%v") could work.

I wonder what else this broke...

Fix is to move to using strncmp() inside the strstr_m function.

Tested on ASCII only.

Andrew Bartlett
-
Jeremy Allison
94a272b9a8 Added strstr_m() function. Use in all places where we might run into mb
(should fix the mb service name problem, can't remember the bugid).
Jeremy.
-
Jeremy Allison
8702d00896 Fix assumption about following directory sep in check_path_syntax(). We
need to try and convert 1 byte, then 2 bytes if that fails. Fixes bug
reported by Simo.
Jeremy.
-
Volker Lendecke
7ed61edbbe Get us a little closer to Windows LSA semantics.
A windows DC does not reply to DCNAME\\Administrator, only to
DOMAIN\\Administrator. Fix that.

Without winbind we are wrong as domain members, we should forward the request
DOMAIN\\Username to the DC on behalf of the asking client. Winbind fixes that
nicely.

Volker
-
Volker Lendecke
9fc0025d12 This might not be used a lot and might not survive for long, but at least it
should work as expected :-)

Fix wb_delgrpmember.

Volker
-
Tim Potter
e6e8b59f53 Fix typo. -
Tim Potter
89f3173f4f Merge from HEAD. -
Tim Potter
1bba071126 Merge from HEAD. -
Jeremy Allison
92c3ae3458 Several mb tidyups - getting ready to address the XXX_sub function.
Jeremy.
-
Gerald Carter
d77d38560d BUG 488: fix the 'show client in col 1' button and corrctely enumerate active connections -
Gerald Carter
df19b6066e fix compiler warning -
Jelmer Vernooij
cc164e5afb Add -O (for writing downloaded files to standard out) based on patch by
Bas van Sisseren <bas@dnd.utwente.nl>
-
Jeremy Allison
6080186fc4 all_string_sub() is broken as it doesn't handle mb chars correctly (and
so breaks when substitution '/' and '\'). It's used by unix_clean_name(),
which is used by reduce_name, which is used by check_name() (phew!).
Now that we know all filenames passed to check_name() are in a "good"
format (no double slashes, all '\\' chars translated to '/' etc.) due
to the new check_path_syntax() we can avoid calling reduce_name unless
widelinks are denied. After this check-in I can fix all_string_sub() to
handle mb chars correctly as it won't be in the direct path in the
main path handling code.
Jeremy.
-
Jeremy Allison
2a263873fd Fix my breakage of NT pipes from the previous patch (sorry). Use the
original srvstr_pull_buf() function to get the pipename not srvstr_get_path().
Jeremy.
-
Gerald Carter
fafb243278 BUG 1015: patch from jmcd to fix statfs redeclaration of statfs struct on ppc -
Gerald Carter
810bc1e2a0 BUG 1080: fix declaration of SMB_BIG_UINT -
Volker Lendecke
f0d99f318c There's a specific error message NT_STATUS_ALIAS_EXISTS. -
Volker Lendecke
3e39d157cb Another typo, sorry for samba-cvs spam :-) -
Volker Lendecke
8ba5bdc330 Fix typo.
Volker
-