1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

46 Commits

Author SHA1 Message Date
Zach Loafman
06d0790c07 Fix various build warnings
This fixes various build warnings on our platform. I'm sure I haven't
caught them all, but it's a start.
(This used to be commit 6b73f259cb)
2008-07-22 15:00:48 +02:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
3611cb13ed r23572: Ensure we obey Unicode consortium restrictions. Code
based on patch from MORIYAMA Masayuki <moriyama@miraclelinux.com>.
Jeremy.
(This used to be commit 0f10d2ed31)
2007-10-10 12:23:31 -05:00
Herb Lewis
8b4669c3c5 r20133: get rid of defined but not used warning - static function only used
inside the #ifdef HAVE_NATIVE_ICONV
(This used to be commit 43ab1d2ba5)
2007-10-10 12:16:27 -05:00
Paul Green
31693197be r15283: Oh yeah. The build farm doesn't do much with head. OK, here is the patch to SAMBA_3_0 to declare prototypes for the initialization functions. These are the same changes I just made to head. --paulg
(This used to be commit 17774387ad)
2007-10-10 11:16:31 -05:00
Jeremy Allison
8d7c886671 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
(This used to be commit d720867a78)
2007-10-10 11:05:02 -05:00
Gerald Carter
f24d88cf9d r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241)
2007-10-10 10:57:02 -05:00
Derrell Lipman
9840db418b r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
(This used to be commit 994694f7f2)
2007-10-10 10:56:24 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Paul Green
b887c41253 r2231: Fix iconv.c to use the Samba-supplied uint8 type not the uint8_t type, which does not exist on all platforms.
(This used to be commit acc793ead7)
2007-10-10 10:52:36 -05:00
Andrew Tridgell
d9a1327474 r2163: converted samba3 to use the new utf-16 aware iconv code. Also changed
iconv to recognise UCS-2LE and UTF-16LE as synonyms, which means this
change should be more robust when applied in trees that treat UCS-2LE
or UTF-16LE as correct.
(This used to be commit 92c9fcaec4)
2007-10-10 10:52:34 -05:00
Jeremy Allison
651daa4b42 r2114: Shameless theft of iconv commit from Samba4 to keep the two libs more in sync :-).
try to cope with a wider range of UTF-16 characters when we are using
an external libiconv library.
Jeremy.
(This used to be commit 5d04cd6804)
2007-10-10 10:52:32 -05:00
Herb Lewis
81c497b38b r938: on an error save the original errno before calling iconv to reset
the conversion state
(This used to be commit 4a5a122b3a)
2007-10-10 10:51:50 -05:00
Andrew Bartlett
d198c55877 Make more functions static, and remove duplication in the use of functions
in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c

(These should perhaps be pulled back out to smbpasswd.c, but that can occour
later).

Andrew Bartlett
(This used to be commit fcdc5efb1e)
2004-02-08 08:38:42 +00:00
Jeremy Allison
39f8afa866 Working on #830. Cope with bad conversions better - don't just memcpy but
try a crap conversion instead. Next this needs to be done to the convert_alloc
function.
Actually fixes some valgrind warnings as well - cool !
Jeremy.
(This used to be commit 6a7919f254)
2004-02-04 02:09:41 +00:00
Alexander Bokovoy
5760704918 Fix #558 -- support ISO-8859-1 internally. Makes Solaris users a bit happier
(This used to be commit ba95fe56d2)
2003-12-10 15:59:28 +00:00
Jeremy Allison
bb0598faf5 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.
(This used to be commit d7e35dfb92)
2003-10-22 23:38:20 +00:00
Jeremy Allison
fa7932296d iconv isn't const safe. Neither should smb_iconv be.
Jeremy.
(This used to be commit 238bb74c16)
2003-09-27 01:29:18 +00:00
Alexander Bokovoy
f9b6d0fd10 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
(This used to be commit c248cd4784)
2003-09-15 12:42:10 +00:00
Tim Potter
4b25a46624 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.
(This used to be commit a0da5ae119)
2003-07-14 01:18:43 +00:00
Rafal Szczesniak
ce12b32c4a Fix compiler warning.
(This used to be commit 3a71b48730)
2003-07-13 16:25:55 +00:00
Jelmer Vernooij
17a3acafa8 Use NTSTATUS as return value for smb_register_*() functions and init_module()
function. Patch by metze with some minor modifications.
(This used to be commit bc4b51bcb2)
2003-04-28 17:48:48 +00:00
Jelmer Vernooij
08b30fcf27 Get rid of module_path_get_name() and use the find backend function
to find duplicates
(This used to be commit 871cad7e9a)
2003-04-24 20:27:19 +00:00
Jelmer Vernooij
004502551b Add support for the new modules system to lib/iconv.c (merge from HEAD)
(This used to be commit 64a357017a)
2003-04-16 13:09:00 +00:00
Jeremy Allison
e9f51a6e38 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.
(This used to be commit 1d3b8c528b)
2003-03-07 19:37:31 +00:00
Martin Pool
ff5d95f0ef Doxygen merge from head
(This used to be commit 38fa289896)
2003-02-27 05:57:21 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Andrew Tridgell
ec31274163 much better auto-init of valid_table[]. This should just about remove
the need for valid.dat
(This used to be commit 0cfd0a5e54)
2001-12-20 06:18:52 +00:00
Herb Lewis
3ea3492713 get rid of compiler warnings (casts and delete unused variables)
(This used to be commit 51cb4411df)
2001-10-23 19:10:30 +00:00
Andrew Bartlett
d25c2b146b Add a few const statements to various odd bits of the tree. (Fixes some
warnings)
(This used to be commit b648cc669d)
2001-09-29 11:51:40 +00:00
Andrew Tridgell
c386d8bdd0 allow all ucs2 chars in utf8, rather than mapping some to a single
char like libiconv does
(This used to be commit e13e8b190c)
2001-09-25 04:27:59 +00:00
Simo Sorce
484a7c0341 move to SAFE_FREE()
(This used to be commit 60e907b7e8)
2001-09-17 02:19:44 +00:00
Andrew Tridgell
5573a1c739 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
(This used to be commit 266d8e6766)
2001-09-07 14:14:57 +00:00
Andrew Tridgell
4951426613 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.
(This used to be commit 594f84b4e3)
2001-07-22 07:38:32 +00:00
Andrew Tridgell
512351db92 switch from UCS2 to UCS-2LE
(This used to be commit e236a3e29e)
2001-07-22 00:27:30 +00:00
Andrew Tridgell
4b7c807085 fixed a silly bug in the internal UTF8 implementation
(This used to be commit 95a9a1814f)
2001-07-06 08:59:50 +00:00
Andrew Tridgell
9a0397cf69 added some comments and removed an unnecessary check
(This used to be commit 25c4b3f193)
2001-07-06 00:14:56 +00:00
Andrew Tridgell
fb50cf54e5 optimised the 7 bit case for utf8 conversion
(This used to be commit 0c61e54f15)
2001-07-05 00:57:42 +00:00
Andrew Tridgell
ee3119cee6 make sure we reset the shift state on error for charsets like SJIS
(This used to be commit 42648a7aad)
2001-07-05 00:04:30 +00:00
Andrew Tridgell
22325f6fdb added builtin support for UTF8
(This used to be commit 76d83e7f70)
2001-07-04 15:08:30 +00:00
Andrew Tridgell
681c3100ed more portability fixes
(This used to be commit bf81826851)
2001-07-04 14:41:06 +00:00
Andrew Tridgell
33b550e47b portability fixes
(This used to be commit 7a5c24c219)
2001-07-04 12:16:24 +00:00
Andrew Tridgell
f51260a65e got rid of __FUNCTION__ debug
(This used to be commit 815ca75274)
2001-07-04 08:03:47 +00:00
Andrew Tridgell
87fbb7092b 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.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00