1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

28 Commits

Author SHA1 Message Date
Jeremy Allison
d7e35dfb92 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
-
Jeremy Allison
238bb74c16 iconv isn't const safe. Neither should smb_iconv be.
Jeremy.
-
Alexander Bokovoy
c248cd4784 Alias charset 646 internally as it is same as ASCII. Should solve Solaris problems where ASCII was not detected and 646.so were requested through dynamic loading -
Tim Potter
a0da5ae119 Undo 'Fix compiler warning'. It didn't work because the value of inbuf changes so
we end up freeing a pointer we didn't mallocate.

Also, calling strdup() in a frequently called function just to clear up a
const compiler warning seems inelegant and inefficient.
-
Rafal Szczesniak
3a71b48730 Fix compiler warning. -
Jelmer Vernooij
bc4b51bcb2 Use NTSTATUS as return value for smb_register_*() functions and init_module()
function. Patch by metze with some minor modifications.
-
Jelmer Vernooij
871cad7e9a Get rid of module_path_get_name() and use the find backend function
to find duplicates
-
Jelmer Vernooij
64a357017a Add support for the new modules system to lib/iconv.c (merge from HEAD) -
Jeremy Allison
1d3b8c528b Patch from Michael Steffens. In his own words :
-------------------------------------------------------------------------
I think there are basically two problem:

  1. Windows clients do not always send ACEs for SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ,
     and SMB_ACL_OTHER.
     The function ensure_canon_entry_valid() is prepared for that, but tries
     to "guess" values from group or other permissions, respectively, otherwise
     falling back to minimum r-- for the owner. Even if the owner had full
     permissions before setting ACL. This is the problem with W2k clients.

  2. Function set_nt_acl() always chowns *before* attempting to set POSIX ACLs.
     This is ok in a take-ownership situation, but must fail if the file is
     to be given away. This is the problem with XP clients, trying to transfer
     ownership of the original file to the temp file.

The problem with NT4 clients (no ACEs are transferred to the temp file, thus
are lost after moving the temp file to the original name) is a client problem.
It simply doesn't attempt to.

I have played around with that using posic_acls.c from 3.0 merged into 2.2.
As a result I can now present two patches, one for each branch. They
basically modify:

  1. Interpret missing SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, or SMB_ACL_OTHER
     as "preserve current value" instead of attempting to build one ourself.
     The original code is still in, but only as fallback in case current values
     can't be retrieved.

  2. Rearrange set_nt_acl() such that chown is only done before setting
     ACLs if there is either no change of owning user, or change of owning
     user is towards the current user. Otherwise chown is done after setting
     ACLs.

It now seems to produce reasonable results. (Well, as far as it can. If
NT4 doesn't even try to transfer ACEs, only deliberate use of named default
ACEs and/or "force group" or the crystal ball can help :)
-------------------------------------------------------------------------
Jeremy.
-
Martin Pool
38fa289896 Doxygen merge from head -
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Andrew Tridgell
0cfd0a5e54 much better auto-init of valid_table[]. This should just about remove
the need for valid.dat
-
Herb Lewis
51cb4411df get rid of compiler warnings (casts and delete unused variables) -
Andrew Bartlett
b648cc669d Add a few const statements to various odd bits of the tree. (Fixes some
warnings)
-
Andrew Tridgell
e13e8b190c allow all ucs2 chars in utf8, rather than mapping some to a single
char like libiconv does
-
Simo Sorce
60e907b7e8 move to SAFE_FREE() -
Andrew Tridgell
266d8e6766 added "display charset" option in smb.conf, along with d_printf()
which should now be used instead of DEBUG(0) or printf() for
interactive messages

I have only converted client.c to use d_printf(), and the code hasn't
had much testing yet. Eventually we want all interactive code to use
d_printf(), plus SWAT
-
Andrew Tridgell
594f84b4e3 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 Tridgell
e236a3e29e switch from UCS2 to UCS-2LE -
Andrew Tridgell
95a9a1814f fixed a silly bug in the internal UTF8 implementation -
Andrew Tridgell
25c4b3f193 added some comments and removed an unnecessary check -
Andrew Tridgell
0c61e54f15 optimised the 7 bit case for utf8 conversion -
Andrew Tridgell
42648a7aad make sure we reset the shift state on error for charsets like SJIS -
Andrew Tridgell
76d83e7f70 added builtin support for UTF8 -
Andrew Tridgell
bf81826851 more portability fixes -
Andrew Tridgell
7a5c24c219 portability fixes -
Andrew Tridgell
815ca75274 got rid of __FUNCTION__ debug -
Andrew Tridgell
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
-