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

58 Commits

Author SHA1 Message Date
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Jeremy Allison
ee34c25c8a First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems
Remove
int toupper_ascii(int c);
int tolower_ascii(int c);
int isupper_ascii(int c);
int islower_ascii(int c);

and replace with their _m equivalents, as they are identical.
2011-07-19 13:19:29 -07:00
Jeremy Allison
cabd9e70e2 Simple +1 changes in hardcoded lengths when changing from safe_strcpy to strlcpy. 2011-05-04 12:12:14 -07:00
Jeremy Allison
c109a70531 Fix convert_string() to take a *converted_size arg. and return a bool.
Makes these interfaces much harder to misuse and easier to ensure error
checking.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
2011-03-30 23:59:37 +02:00
Günther Deschner
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Günther Deschner
184339825d s3-build: include mangle.h only where needed.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
aba1bf4b5e s3-build: only include memcache.h where needed.
Guenther
2010-08-26 00:20:28 +02:00
Volker Lendecke
d3a0ff311e s3: Make char_flags and base_reverse const arrays
This moves those arrays from dynamic to static, shared memory, removing them
from globals.c.

I did it by dumping the result of init_tables() with dump_data(). Some massage
by an editor macro made it the initializer.
2010-08-24 22:45:41 +02:00
Jeremy Allison
ff9375a04c Make us pass SHORTNAME-TEST.
Jeremy
2009-05-14 16:49:18 -07:00
Volker Lendecke
19ce90b90e Just for fun: Move some bytes from bss to text 2009-02-01 14:34:22 +01:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Stefan Metzmacher
c19ed7669c s3:smbd: make const globals in mangle_hash2.c really static const
const char *foo, means a non-const pointer to
a const char.

const char * const foo, means a const pointer to
a const char.

char * const foo, would mean a const pointer to
a non-const char.

metze
2009-01-08 12:22:19 +01:00
Stefan Metzmacher
7f2cf6b166 s3:smbd: make mangle_fns const
metze
2009-01-08 12:22:17 +01:00
Jeremy Allison
915647da9c Fix CID 523 - wrong null deref check.
Jeremy.
(This used to be commit 05cadffeab)
2008-01-11 22:50:13 -08:00
Volker Lendecke
f427d4ce65 Add a in-memory cache
This is a more general API that caches data with a LRU scheme. See
include/cache.h. No comments yet, I'm still working on it. But Jeremy has given
me a hint in one of his checkins that he would like to make use of this now.

The idea is that we get rid of all our silly little caches and merge them all
into one cache that we can then very easily trim, for example even with a
smbcontrol message if someone decides memory is tight. The main user is the
stat cache, this patch also converts the getwd cache. More caches to come.
(This used to be commit 7a911b3571)
2007-12-18 09:56:04 +01: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
Jeremy Allison
132ee3990a r25009: Large patch discussed with Volker. Move unix_convert to a talloc-based
interface. More development will come on top of this. Remove the
"mangled map" parameter.
Jeremy.
(This used to be commit dee8beba7a)
2007-10-10 12:30:32 -05:00
Simo Sorce
281931ea77 r24603: In case of error we need to free prefix_cache otherwise on re-init the first
statement will return positively but prefix_cache_hashes would be NULL
(This used to be commit fdc20894a0)
2007-10-10 12:30:10 -05: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
3a60a67432 r18793: Fix BE string handling in the auto-generated
code. Should now work again with ASU.
Jeremy.
(This used to be commit 53e97bf928)
2007-10-10 12:00:58 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Volker Lendecke
76e581b983 r15103: Okay, looking closer: Samba4 tdb not exporting u32 is a bug in samba4's
tdb. tdb_open_ex needs it. Can someone from samba4 tell me how this should be
handled?

Thanks,

Volker
(This used to be commit 0a2f1ed5e9)
2007-10-10 11:16:23 -05:00
Volker Lendecke
4f24046294 r15102: u32 is a tdb-only thing that's not exported by samba4 tdb. Replace by uint32.
Volker
(This used to be commit 0a1665a1b7)
2007-10-10 11:16:23 -05:00
Jeremy Allison
5a4881bf39 r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")
and replace calls to isupper/islower/toupper/tolower with
ASCII equivalents (mapping into _w variants).
Jeremy.
(This used to be commit c2752347eb)
2007-10-10 11:05:58 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Jeremy Allison
4850bc6310 r10600: Fix bug #2769 (mangle filenames ending in a space)
and an old bug where mangle mathod hash wasn't mangling
file names with more than one dot which also end in a dot.
Jeremy.
(This used to be commit 105e38847d)
2007-10-10 11:04:47 -05:00
Jeremy Allison
7e509e9b99 r7842: With the patch I sent Steve yesterday this gives us complete POSIX pathnames.
ie. files containing : and \ can be accessed from Linux.
Jeremy.
(This used to be commit e9b8d23d61)
2007-10-10 10:57:59 -05:00
Jeremy Allison
75f109bc81 r6977: Fix bug #2735 (not mangling control characters) plus
ensure we don't create files with control characters
either.
Jeremy.
(This used to be commit 0ca2423c70)
2007-10-10 10:56:59 -05:00
Jeremy Allison
02e3717ee9 r6625: Remove another global variable left over from a long time ago (magic char).
Jeremy.
(This used to be commit b1bfa9cb37)
2007-10-10 10:56:47 -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
Jeremy Allison
5ef08833b8 r2082: lp_path should be lp_pathname.
Paranoia fix on mangle prefix.
Jeremy.
(This used to be commit cc91bbe20d)
2007-10-10 10:52:30 -05:00
Gerald Carter
0c6d7f28d6 r1570: merging changes from 3.0.5
(This used to be commit 430cf63b91)
2007-10-10 10:52:15 -05:00
Jeremy Allison
e0da56a848 r570: Remove lots of globals to handle case issues - move them
to connection struct entries (as they should have been from
the start). Jerry, once you've cut over to 3.0.4 release
branch I'll add this to 3.0 also.
- Jerry cut over :-).
Jeremy.
(This used to be commit 578a508509)
2007-10-10 10:51:30 -05:00
Jeremy Allison
e3f5b54270 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.
(This used to be commit 7b96765c23)
2004-03-11 22:48:24 +00:00
Jeremy Allison
7b39861342 Ensure we mangle names ending in '.' in hash2 mangling method.
Jeremy.
(This used to be commit fc2af591f5)
2003-11-18 01:47:27 +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
9b8cbdfc2b Fix OOPS when dealing with mangled names reported by several users.
This was my bug when removing a redundant strlen.
Jerry - last showstopper I knew about.
Jeremy.
(This used to be commit 6e6769c206)
2003-09-15 21:19:43 +00:00
Jeremy Allison
dd50c0ed68 A *curse* upon the person who #ifdefed out the mangle debug statements
by default ! This is code that really needs to be able to be looked at
on a customer system if it's misbehaving !
Jeremy
(This used to be commit d512650340)
2003-09-15 18:53:01 +00:00
Jeremy Allison
46765d97fa Check for embedded mb chars when testing for illegal characters like /.
Should fix mangling for Japanese language.
Jeremy.
(This used to be commit a238bcc440)
2003-08-27 19:01:55 +00:00
Jeremy Allison
9511c987df Fix initial debug.
Jeremy.
(This used to be commit bd40da0635)
2003-08-27 18:21:26 +00:00
Jeremy Allison
8df07f37a2 Remove completely unneeded malloc/free out of this codepath.
Jeremy.
(This used to be commit fda2541697)
2003-08-27 18:17:33 +00:00
Andrew Bartlett
ad0d6509a7 Merge from HEAD:
- Make ReadDirName return a const char*.

 - Consequential changes from that

 - mark our fstring/pstring assumptions in function prototypes

Andrew Bartlett
(This used to be commit 10b53d7c6f)
2003-03-17 22:56:13 +00:00
Andrew Bartlett
266ec4aac0 Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
(This used to be commit 9ef0d40c3f)
2003-02-24 03:09:08 +00:00
Jeremy Allison
1ef283d5c3 Merge mangle prefix code.
Jeremy.
(This used to be commit 83261f4332)
2002-10-21 20:40:23 +00:00
Jeremy Allison
b8e4a3331d Merge Anton's 64-bit fix.
Jeremy.
(This used to be commit 0644f6a68e)
2002-10-15 05:58:32 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Jelmer Vernooij
127e77e6e3 Sync 3.0 branch with head
(This used to be commit 42615b945e)
2002-08-17 15:27:10 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00