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

84 Commits

Author SHA1 Message Date
Andrew Bartlett
02f81719c7 Add const. -
Andrew Bartlett
5371720971 Add const. -
Gerald Carter
f806101204 don't forget the NULL -
Gerald Carter
7d547f50f9 and the winner of "i should have just written it in assembly
is..."

don't use pstrcpy() when you are not dealing with pstrings.
-
Gerald Carter
6631984b12 don't pass NULL pointers to strcmp() -
Andrew Bartlett
162477bb08 Some cleanups:
- Don't use pstrcpy into an allocated string - use safe_strcpy() directly
instead.

- Keep a copy of the 'server_info' attached to the vuid.  In future use this
for things like the session key, homedir and full name instead of current
copies.

- Try to avoid memory leak/segfault on Realloc failure

- clear up #endif comments

Andrew Bartlett
-
Tim Potter
4bc82624f6 Remove unused variable. -
Jeremy Allison
6e0cfec165 Fix problem with "hide unreadable". stat file opens are baaack :-).
Jeremy.
-
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
-
Jeremy Allison
3c9d24d7c3 Added final Steve French patch for "required" attributes with old
dir listings. Added regression test in smbtorture (in HEAD) also.
Jeremy.
-
Simo Sorce
850d6573ae fix file_is_special test, was wrong. -
Jeremy Allison
15ff5a48f9 Reverted and tidied up the "special" files patch. Adds "hide special files"
option (set to false by default). Made checking for hide unreadable/writable
more efficient (less stat calls, less allocating printf calls).
Jeremy.
-
Simo Sorce
5995411334 do not expose special files, only files, directories and links (and we
should really check if a link points to a special file and deny access
imho), expose no fifo, socket, devices ...
-
Simo Sorce
161dd6d963 as suggested by Alexander Oswald <oswald@is.haw-hamburg.de>
hide only unwriteable files and not dirs with this one.

may be a hide unwriteable dirs param will follow.
-
Simo Sorce
e6b38a881b nice day today
add also hide unwriteable as per user request
-
Jeremy Allison
5e2571f424 Merge in mangle fixes from 2.2.
Jeremy.
-
Jeremy Allison
fda7a11b09 Stop smbd looping when hide unreadable is true and .. is unreadable.
Jeremy.
-
Jeremy Allison
a9895fcb30 Tidy up winbindd debug. Added Bill Moran's hide unreadable fix.
Jeremy.
-
Andrew Tridgell
be23d87a17 This split the mangling code up to allow for the possibility of multiple
mangling implementation, selectable using "mangling method = " in smb.conf

It also tidies the interface a little, although it is still nasty.
-
Jeremy Allison
3b1b8ac435 Fix the mp3 rename bug - also tidy up our open code and remove the special
cases for rename and unlink. Had to add desired_access into the share mode record.
Jeremy.
-
Herb Lewis
d4d9361eec return . and .. first in readdir - this fixes masktest on IRIX which
returns . then single letter files then .. then all other files.
-
Jeremy Allison
504e5ef049 Remove the "stat open" code - make it inline. This should fix the
bugs with opening and renaming mp3 files, also the word rename
problems that people have had for a while.
Needs a make clean :-) make.
Also added JohnR's printing fix.
Jeremy.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Jeremy Allison
f6d6825bc8 Made "hide unreadable" work much more reliably (just for Volker :-).
Jeremy.
-
Tim Potter
dfb8566220 Don't put a \n on the end of the arg to exit_server() -
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Simo Sorce
a95943fde0 move to SAFE_FREE() -
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.
-
Andrew Tridgell
338d5ca8ad use asprintf for hideunreadable option -
Jeremy Allison
0d10113d01 Rememver to use VFS at all times... even in new user_can_read_file code :-).
Jeremy.
-
Andrew Tridgell
7b6cfe2430 hide unreadable patch from idra -
Jeremy Allison
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
-
Gerald Carter
f77fa6a0e5 removed wrong patch to get_dir_entry(). This was left over from the
wildcard stuff....
-
Gerald Carter
9347121ce6 merge from SAMBA_2_2 -
Tim Potter
1ec44d62ee Turned down noisy debug statement.
From "Richard Bollinger" <rabollinger@home.com>
-
Jeremy Allison
b07611f815 Restructuring of vfs layer to include a "this" pointer - can be an fsp or
a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).

In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
-
Andrew Tridgell
92109d7b3c more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
-
Andrew Tridgell
38f5e13367 fixed our smbsearch code. We now store the mask with the dptr, this
turns out to be essential for a correct implementation (there ins't
enough room to store all possible masks in the status return
structure!)
-
Andrew Tridgell
03e9cea004 - removed all our old wildcard matching code and replaced it with a
call to ms_fnmatch(). This also removes all the Win9X semantics stuff
and a bunch of other associated cruft.

- moved the stat cache code into statcache.c

- fixed the uint16 alignment requirements of ascii_to_unistr() and
  unistr_to_ascii()

- trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as
  unicode always (at least thats what NT4 does)

- fixed some errors in the in-memory tdb code. Still ugly, but doesn't
  crash as much
-
Tim Potter
a9b628ebaa More Japanese filename fixes wrt VFS code from
Tomoki AONO <aono@cc.osaka-kyoiku.ac.jp>
-
Tim Potter
176c405d27 Put back lots of missing calls to dos_to_unix(). Thanks to
aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO)
-
Tim Potter
3aad500c0f Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops
structure contained in the connection_struct.
-
Jeremy Allison
fc0219c7cc First set of speed improvements from Ying Chen <ying@almaden.ibm.com>.
Inline several commonly used functions as macros.
Jeremy.
-
Jeremy Allison
9e90122afd client/client.c: I18N fixes.
smbd/dir.c: Reformatting comments.
smbd/ipc.c: New password change code for Win98.
Jeremy.
-
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch -
Tim Potter
c1cbe07c03 Forgot about closedir() function for VFS. Hoo embarassing. -
Tim Potter
5051a21061 Use VFS operations for file I/O.
Changed calls to dos_{opendir,readdir} to vfs_{opendir,readdir}
equivalents.
-
Jeremy Allison
6acb4b68f6 Makefile.in: Added maintainer mode fixes.
aclocal.m4: Added AC_LIBTESTFUNC.
configure.in: Fixed -lsecurity -lsec problems.
client.c: dos_ fixes.
groupdb/aliasunix.c: Dead code removal.
include/includes.h: Added default PRINTCAP_NAME.
lib/genrand.c: dos_ fixes.
lib/replace.c: Added strtoul.
lib/system.c: dos_ fixes.
lib/util.c: dos_ fixes.
lib/util_sid.c: Signed/unsigned fixes.
lib/util_str.c: removed bad const.
locking/locking_slow.c: dos_ fixes.
printing/printing.c: dos_ fixes.
rpc_server/srv_samr.c: Dead code removal.
rpc_server/srv_sid.c: global_myworkgroup defined with wrong size AGAIN !
smbd/dir.c: dos_ fixes.
smbd/open.c: dos_ fixes.
smbd/oplock.c: dos_ fixes.
smbd/reply.c smbd/server.c smbd/service.c smbd/uid.c: dos_ fixes.

Jeremy.
-
Andrew Tridgell
64692f292f really fixed the warning this time :) -
Andrew Tridgell
d4291d353b fixed a warning -