summaryrefslogtreecommitdiff
path: root/source3/smbd/dir.c
AgeCommit message (Collapse)AuthorFilesLines
2001-04-28use asprintf for hideunreadable optionAndrew Tridgell1-14/+8
(This used to be commit 338d5ca8addb3079e0ab4a68338596d6e3b17ddb)
2001-04-18Rememver to use VFS at all times... even in new user_can_read_file code :-).Jeremy Allison1-3/+3
Jeremy. (This used to be commit 0d10113d01d6d15f470359259a76e4f107a06c73)
2001-04-16hide unreadable patch from idraAndrew Tridgell1-0/+49
(This used to be commit 7b6cfe243002a92f5dfb52413e9b3550c61cecfb)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-4/+0
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2001-02-23removed wrong patch to get_dir_entry(). This was left over from theGerald Carter1-5/+0
wildcard stuff.... (This used to be commit f77fa6a0e510fe5ad54d20eaabd345e6ee0526dc)
2001-02-08merge from SAMBA_2_2Gerald Carter1-0/+5
(This used to be commit 9347121ce6888afeae3cdf256b5f0c5b9c58b0bc)
2001-01-30Turned down noisy debug statement.Tim Potter1-1/+1
From "Richard Bollinger" <rabollinger@home.com> (This used to be commit 1ec44d62eed67d88f59417d20680a073918626bd)
2000-10-06Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison1-4/+4
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. (This used to be commit b07611f8159b0b3f42e7e02611be9f4d56de96f5)
2000-05-10more merging voodooAndrew Tridgell1-0/+4
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 (This used to be commit 92109d7b3c06f240452d39f669ecb8c9c86ab610)
2000-04-30fixed our smbsearch code. We now store the mask with the dptr, thisAndrew Tridgell1-10/+11
turns out to be essential for a correct implementation (there ins't enough room to store all possible masks in the status return structure!) (This used to be commit 38f5e133670ada6e5799a16cf1a0e2e3ee1d9afd)
2000-04-30- removed all our old wildcard matching code and replaced it with aAndrew Tridgell1-1/+1
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 (This used to be commit 03e9cea004bbba72161a5323cf3b4556c94aed8e)
2000-03-29More Japanese filename fixes wrt VFS code fromTim Potter1-6/+7
Tomoki AONO <aono@cc.osaka-kyoiku.ac.jp> (This used to be commit a9b628ebaa90e464366d0284226753f31439af9f)
2000-02-03Put back lots of missing calls to dos_to_unix(). Thanks toTim Potter1-4/+8
aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO) (This used to be commit 176c405d2702a4245561ff56c8eac3c754a0dea3)
2000-02-03Mega-VFS merge. Yeah baby!Tim Potter1-8/+5
Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct. (This used to be commit 3aad500c0fb61232ed3431ff4b743b5d18ec852f)
2000-01-25First set of speed improvements from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison1-12/+0
Inline several commonly used functions as macros. Jeremy. (This used to be commit fc0219c7cc4b83e6db17d5b3be70d74fd7971089)
2000-01-05client/client.c: I18N fixes.Jeremy Allison1-58/+38
smbd/dir.c: Reformatting comments. smbd/ipc.c: New password change code for Win98. Jeremy. (This used to be commit 9e90122afd1b6a7cf38660fc3bc3aa8e526bf08b)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-236/+407
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-04-08Forgot about closedir() function for VFS. Hoo embarassing.Tim Potter1-2/+2
(This used to be commit c1cbe07c0391c36066b068fdd42bf1aa40259a5c)
1999-04-04Use VFS operations for file I/O.Tim Potter1-3/+3
Changed calls to dos_{opendir,readdir} to vfs_{opendir,readdir} equivalents. (This used to be commit 5051a210619374639121124e32d24217255e992e)
1998-11-25Makefile.in: Added maintainer mode fixes.Jeremy Allison1-2/+2
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. (This used to be commit 6acb4b68f68d516e2ac3c47e500f5600d653435e)
1998-10-08really fixed the warning this time :)Andrew Tridgell1-1/+1
(This used to be commit 64692f292fc610b90de97a85101203946ce65bfa)
1998-10-08fixed a warningAndrew Tridgell1-1/+1
(This used to be commit d4291d353b293bbc65fb0bf76c2d943733297726)
1998-10-08- fixed a bunch of warnings and minor errorsAndrew Tridgell1-1/+1
- got smbtorture to compile - removed %D from some of lukes code - Luke, what is %D? it ain't portable anyway (This used to be commit 91597c12fb593f49b23c7cea5b64dbb89a0428b3)
1998-10-05fixed some cast warnings from "cc -64" on IRIXAndrew Tridgell1-3/+4
(This used to be commit 624097e8f4a104393865ee100e884f000ca3f6df)
1998-09-28Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1-3/+0
Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
1998-09-03Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1-1/+2
to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824)
1998-09-01More abstraction of file system data types, to move to a 64Jeremy Allison1-4/+4
bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy. (This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb)
1998-08-14this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1-65/+63
Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell1-287/+14
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
1998-07-24Changed the definition of the linked list header used in the directoryChristopher R. Hertel1-1/+1
cache so that it uses the new ubi_dlNewList() macro in ubi_dLinkList.h. (This used to be commit 16f0ad0c913e2d5b0198409485c56ad4809ca077)
1998-07-17Code added to fix the renaming of a directory under NT SMB calls.Jeremy Allison1-2/+2
local.h: Changed MAXDIR to MAX_OPEN_DIRECTORIES - shmem size also tuned by this. dir.c: Use MAX_OPEN_DIRECTORIES. nttrans.c: Allow opening of a directory to succeed. Doesn't actually open a file descriptor but takes a files_struct slot marked as an fd. reply.c: Changed to close any outstanding is_directory files. reply_close changed to understand directory files. server.c: Added open_directory(), close_directory() calls. smb.h: Added is_directory to files_struct. Changed OPEN_FNUM to check that target is !is_directory (this prevents the normal file calls from processing a directory files_struct. Jeremy. (This used to be commit e01ce693f47e75e277f3440d46e32b0bd866b550)
1998-05-22I've put the ubiqx headers back into includes.h, and removed them fromChristopher R. Hertel1-1/+0
dir.c & mangle.c. This was possible after I checked the tree code to make sure that the tree code did not reference functions by macro name. Also, note that the AVL module has been removed to prevent conflict with the SplayTree macro defines. Chris -)----- (This used to be commit a1f4c8567c3c5264cbfa99867fa894cafab7da81)
1998-05-22Removed all ubiqx includes from includes.h. So far, this was only a problemChristopher R. Hertel1-0/+1
for dir.h, which I've fixed. Andrew did not add includes.h to the ubiqx headers, which is good because it would cause internal conflicts within the ubiqx tree modules. It's also bad because the definitions and includes that are part of includes.h are now in the ubiqx C files, but not in the header files. So, if includes.h were to redefine int, for example, the new definition would be in the ubiqx C files, but not in the headers. So, until Andrew and I can work something out that we both agree upon, there are three basic rules: 1) Don't include includes.h in the ubiqx headers. Problems may arise. 2) The ubiqx headers must follow includes.h in any Samba module that uses them. This can and should all be worked out. We just have to talk about it. Chris -)----- (This used to be commit 2b6be7084df4ddfca3a1ab7b73304007c5f9d0aa)
1998-05-12This is a security audit change of the main source.Jeremy Allison1-7/+7
It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-02-26Fix for NT redirector bug where deltree fails if the resume keyJeremy Allison1-7/+2
indexes are changed between directory scans. This fix does what NT4.x SP3 does in that it stops using resume keys and returns zero instead. We now use the filename in findnext to continue the search in the correct place (as NT does). Jeremy. (This used to be commit b813fb22c4c1b0ee48667e99e82434d20266bbf2)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-1/+1
This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1997-10-17Simply moved the #include for ubi_dLinkList.h from within dir.c toChristopher R. Hertel1-2/+0
includes.h. More consistent with current practice. (This used to be commit cb51c860b352fb9d07fb3298d0317274ba6c9925)
1997-10-16Made changes to the dir cache functions:Christopher R. Hertel1-83/+121
- They now use the ubi_dLinkList linked list code. This is not a big gain, I suppose. It would be significant if there were lots of doubly-linked lists in the code and I replaced them all. The only other advantage is that the code is more modular, which appeals to my own sense of order, if no one elses. :-} - I allocate space for the entry structure and the strings in one go, instead of using malloc() and separate strdup() calls. This should be more efficient, and allows for a single call to free() to free the whole thing. These are very minor changes, but they do serve to make me more familiar with the code overall. (This used to be commit 1dafef88871338f06dbcbbb67ce3bbbb460d7bb6)
1997-09-30dir.c: more pstrcpys.Jeremy Allison1-3/+3
local.h: Add OPLOCK_BREAK_TIMEOUT. password.c: Fix for paranoia password server security bug. proto.h: Updated. reply.c: Oplock changes. server.c: Massive oplock changes - nearly there.... smb.h: oplock definitions. util.c: Add local message processing queues for oplocks. Jeremy (jallison@whistle.com) (This used to be commit 92f1553db2cdf6f32881eb984a87050cf3e4760b)
1997-09-26Adding Andrews buffer overflow fixes into the main branch.Jeremy Allison1-1/+1
Jeremy (jallison@whistle.com) (This used to be commit e7eb1f044d3101679dc7a118820ea5efe0cd837c)
1997-08-20Fix suggested by "Christian Groessler" <chris@fast-ag.de>Samba Release Account1-1/+1
dir.c: Cause dptr_create to return -2 when failing on unix error. reply.c: Use UNIXERROR in more cases. server.c: Add ENOTDIR mapping to error table. trans2.c: Correctly determine UNIX error on dptr_create. Jeremy (jallison@whistle.com) (This used to be commit de38a0b34fcd65fa3024300f978aa30eb86d854f)
1997-07-24Makefile: Added UNIXWARE 2.x with shadow passwords from fja@extratech.comSamba Release Account1-15/+17
client.c: Made prompt appear at debug level 0. Fixed strcasecmp redefinition. Caused client to use set_blocking rather than making fcntl calls itself. dir.c: Removed redundent snum parameters. includes.h: Added SCO fixes. loadparm.c: Made default 'files to hide' a null string. nmbd.c: Removed O_NONBLOCK from pid file open for platforms that dont have it. proto.h: Changed snum to cnum where needed. Changed is_xx_path to is_in_path (now called via MACRO). quotas.c: Swapped setuid/seteuid calls when restoring uid. reply.c: Removed redundent snum parameters. server.c: Changed snum to cnum where needed. Setup new veto_list, hide_list namelists. Added standard_sub changes from Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and Paul Rippin <pr3245@nopc.eurostat.cec.be> shmem.c: Changed cast for sizeof to be int before negating. smb.h: Added new veto_list, hide_list entries to connections. Added IS_PRINT, IS_HIDDEN_PATH, IS_VETO_PATH macros. trans2.c: Removed redundent snum parameters. util.c: Added standard_sub_basic changes from Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and Paul Rippin <pr3245@nopc.eurostat.cec.be> Fixed up veto/hidden path processing so the paths are pres-parsed and checked for wildcards (for speed). Jeremy (jallison@whistle.com) (This used to be commit 9afa36f7874cfd527aa6ef1e7965c1d35d46ab1f)
1997-07-06added, tested and debugged new "hide files" option.Samba Release Account1-13/+15
lkcl (This used to be commit 60af320a436c3a26230fd7ac71856e67ef64e819)
1997-07-03Fix for deleting directories that contain only veto files.Samba Release Account1-4/+4
Needed for interoperability with netatalk volumes. Jeremy (jallison@whistle.com) (This used to be commit e72a8513bccf77177f6fb6002057fee608947a32)
1997-07-01Rolled back Lukes changes. Not quite ready for prime time.Samba Release Account1-11/+11
Jeremy (jallison@whistle.com) (This used to be commit ed04ec7ab8b8e73b5442bdef03d5a3c994247b4e)
1997-07-01made "hide files" and "veto files" into per-service parameter sections,Samba Release Account1-11/+11
instead of just [global]. this makes it easier to decide whether to remove the "hide dot files" per-service parameter, and supercede it with a default "hide files" value of ".*". lkcl (This used to be commit f3ee4620ea7b93e4a00e77f9d787a118fd11ccaa)
1997-05-20dir.c: Fixed double slash issue.Samba Release Account1-1/+6
includes.h: Changed to ifdef FAST_SHARE_MODES. ipc.c: Changed lp_workgroup() to myworkgroup. loadparm.c: Added new shared mem parameters. Added Luke's fix. locking.c: Rewrite to do share modes better (both fast and slow modes). nameannounce.c: Changed lp_workgroup() to myworkgroup. Added Luke's fix. nameconf.c: Changed lp_workgroup() to myworkgroup. namedbname.c: Improved debug. namedbserver.c: Changed lp_workgroup() to myworkgroup. namedbsubnet.c: Added Luke's fix - rewritten somewhat. namedbwork.c: Changed lp_workgroup() to myworkgroup. nameelect.c: Added Luke's fix - rewritten somewhat. nameresp.c: Stoped shadowing global. nameserv.c: Added Luke's fix - Improved debug. nameservreply.c: Improved debug. namework.c: Changed lp_workgroup() to myworkgroup. nmbd.c: Added Luke's fix - Changed lp_workgroup() to myworkgroup. pipes.c: Changed lp_workgroup() to myworkgroup. proto.h: Added Luke's fix, added smb_shm_ proto's. reply.c: Changed lp_workgroup() to myworkgroup. server.c: Rewrite to do share modes better (both fast and slow modes). shmem.c: Rewrite to do share modes better (both fast and slow modes). smb.h: Rewrite to do share modes better (both fast and slow modes). status.c: Rewrite to do share modes better (both fast and slow modes). trans2.c: Fixed double slash issue. util.c: Tidied up, created myworkgroup. Jeremy Allison (jallison@whistle.com). (This used to be commit 2a1711eaaf08bb6776770cd3c96b3010f431a677)
1997-05-08'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)Samba Release Account1-1/+1
Wed May 7 1997: Update for 1.9.17alpha1 release - 'browsefix release' designed to make browsing across subnets work. byteorder.h: Updated copyright to 1997. charcnv.c: Updated copyright to 1997. charset.c Updated copyright to 1997. charset.h Updated copyright to 1997. client.c Updated copyright to 1997. clientutil.c Updated copyright to 1997. dir.c Updated copyright to 1997. fault.c Updated copyright to 1997. includes.h Updated copyright to 1997. interface.c Updated copyright to 1997. ipc.c Updated copyright to 1997. kanji.c Updated copyright to 1997. kanji.h Updated copyright to 1997. loadparm.c Updated copyright to 1997. locking.c Updated copyright to 1997. mangle.c Updated copyright to 1997. message.c Updated copyright to 1997. nameannounce.c Made use of WINS subnet explicit. Added reset_announce_timer() so announcement can be made immediately when we become a master. Expanded code to do sync with dmb. namebrowse.c Removed redundent checks for AM_MASTER in sync code. Made use of WINS subnet explicit. namedbname.c Made use of WINS subnet explicit. namedbresp.c Made use of WINS subnet explicit. namedbserver.c Made use of WINS subnet explicit. namedbsubnet.c Explicitly add workgroup to WINS subnet when we become a dmb. Made use of WINS subnet explicit. namedbwork.c Made use of WINS subnet explicit. Removed redundent check_work_servertype() function. nameelect.c Explicitly add workgroup to WINS subnet when we become a master browser. Made use of WINS subnet explicit. namelogon.c Updated copyright to 1997. namepacket.c Updated copyright to 1997. namequery.c Updated copyright to 1997. nameresp.c Made use of WINS subnet explicit. Made nmbd fail if configured as master browser and one exists already. nameserv.c Made use of WINS subnet explicit. Remove redundent logon server and domain master code. nameserv.h Add emumerate subnet macros. nameservreply.c Made use of WINS subnet explicit. nameservresp.c Updated copyright to 1997. namework.c Made use of WINS subnet explicit. Updated code to add sync browser entries to add subnet parameter. nmbd.c Added sanity check for misconfigured nmbd. nmblib.c Updated copyright to 1997. nmblookup.c Updated copyright to 1997. nmbsync.c Removed redundent AM_ANY_MASTER check. params.c Updated copyright to 1997. password.c Updated copyright to 1997. pipes.c Updated copyright to 1997. predict.c Updated copyright to 1997. printing.c Updated copyright to 1997. proto.h Changed protos for new nmbd code. quotas.c Updated copyright to 1997. replace.c Updated copyright to 1997. reply.c Updated copyright to 1997. server.c Updated copyright to 1997. shmem.c Updated copyright to 1997. smb.h Updated copyright to 1997. smbencrypt.c Updated copyright to 1997. smbpasswd.c Updated copyright to 1997. smbrun.c Updated copyright to 1997. status.c Updated copyright to 1997. system.c Updated copyright to 1997. testparm.c Updated copyright to 1997. testprns.c Updated copyright to 1997. time.c Updated copyright to 1997. trans2.c Updated copyright to 1997. trans2.h Updated copyright to 1997. uid.c Updated copyright to 1997. username.c Updated copyright to 1997. util.c Updated copyright to 1997. version.h Changed to 1.9.17alpha1. (This used to be commit cf23a155a1315f50d488794a2caf88402bf3e3e6)
1996-12-10Added in veto files parameter create by Whistle.Samba Release Account1-0/+3
jra@cygnus.com (This used to be commit d5659df9c23822766501397b8fbbffbce6842ea7)
1996-08-24added debug infoAndrew Tridgell1-1/+1
(This used to be commit 4a988021a2aceaa5fc0d4e5ba2802392a7141ad8)