summaryrefslogtreecommitdiff
path: root/source3/smbd/dfree.c
Commit message (Collapse)AuthorAgeFilesLines
* smbd: Make sys_disk_free staticChristof Schmitt2019-08-141-2/+5
| | | | | | | | | | The function is only called from the same file. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Wed Aug 14 17:47:33 UTC 2019 on sn-devel-184
* s3: smbd: Convert dfree code to use file_lines_ploadv().Jeremy Allison2019-05-241-12/+23
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13964 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* smbd: Move dfree_info structChristof Schmitt2018-05-251-0/+8
| | | | | | | | | | As the struct is no longer used as part of connection_struct, move it to dfree.c. This is not backported, as it would change the VFS ABI. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Flush dfree memcache on service reloadChristof Schmitt2018-05-251-0/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13446 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Cache dfree information based on query pathChristof Schmitt2018-05-251-19/+80
| | | | | | | | | | | | Sub directories in a SMB share can have different free space information (e.g. when a different file system is mounted there). Caching the dfree information per SMB share will return invalid data. Address this by switching to memcache and store the cached data based on the query path. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13446 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: VFS: Change SMB_VFS_DISK_FREE to use const struct smb_filename * instead ↵Jeremy Allison2017-06-181-1/+1
| | | | | | | | | | of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* smbd: get a valid file stat to disk_quotasUri Simchoni2016-08-131-9/+7
| | | | | | | | | | | | Most calls to disk_quotas originate at a state with an open file descriptor. Pass the file's stat info down to disk_quota, so that we can avoid extra stat's and the related error handling. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove "includes.h" from util_file.cVolker Lendecke2016-02-231-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Add "mem_ctx" to file_lines_ploadVolker Lendecke2016-02-231-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: show correct disk size for different quota and dfree block sizesUri Simchoni2016-01-271-1/+8
| | | | | | | | | | When file system stats (VFS disk_free_fn) and quota (VFS get_quota_fn) return different block sizes, normalize values before comparing. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11681 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* make disk_norm() staticUri Simchoni2016-01-261-1/+1
| | | | | | | | Now that disk_norm() is being run centrally from the SMB layer it can be made static. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd: refactor disk_free handlingUri Simchoni2016-01-261-6/+7
| | | | | | | | | | | Move most of the logic that handles determination of disk size and free space from default VFS handler to the SMB layer - letting the VFS handle the basic task of querying the file system for general stats and quota. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3-smbd: Remove the global dfree_broken variableAndreas Schneider2015-07-171-0/+1
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3-smbd: Leave sys_disk_free() if dfree command is usedAndreas Schneider2015-07-171-16/+13
| | | | | | | | | | | | | | | | If we have a broken system which reports incorrect sizes we provide the 'dfree command'. This command makes sure Samba gets the correct values. However after that we call the quota command which then reports the broken values. The dfree command should take care to provide the correct values and in case of quota's it should also calculate the quote correctly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11403 Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3/vfs: remove unused SMB_VFS_DISK_FREE() small_query parameterDavid Disseldorp2015-02-171-28/+12
| | | | | | | | | | | | | | | The small_query parameter for SMB_VFS_DISK_FREE() was, prior to the previous commit, used to obtain 16-bit wide free-space information for the deprecated dskattr SMB_COM_QUERY_INFORMATION_DISK command. With the dskattr handler now performing the 16-bit collapse directly, the small_query parameter can be removed from the entire code path. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Feb 17 05:37:20 CET 2015 on sn-devel-104
* param: rename lp function and variable from "maxdisksize" to "max_disk_size"Garming Sam2014-02-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: in sys_disk_free(), improve a debug messageMichael Adam2012-09-041-1/+1
|
* s3:smbd: in sys_disk_free(), improve a debug messageMichael Adam2012-09-041-1/+1
|
* s3:smbd: in sys_disk_free(), fix line length and indentation of debug statementMichael Adam2012-09-041-2/+3
|
* s3:smbd: in sys_disk_free(), fix a debug messageMichael Adam2012-09-041-1/+1
|
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-1/+1
| | | | | | | | | | They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3:vfs_gpfs: Export disk_norm functionChristof Schmitt2012-03-221-1/+1
| | | | | | vfs modules implementing the disk_free callback need access to the function disk_norm for normalizing the data if the parameter small query is true.
* s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher2009-01-081-3/+3
| | | | | | The goal is to move all this variables into a big context structure. metze
* Use {u,}int64_t instead of SMB_BIG_{U,}INT.Jelmer Vernooij2008-10-141-17/+17
|
* Use common util_file code.Jelmer Vernooij2008-10-121-1/+1
|
* Remove connection_struct->mem_ctx, connection_struct is its own parentVolker Lendecke2008-05-051-1/+1
| | | | (This used to be commit 559180f7d30606d1999399d954ceedc798c669a4)
* int->boolVolker Lendecke2007-12-101-2/+2
| | | | (This used to be commit 874258195278bc8c6bb3011c153c5d646fff9e75)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-3/+3
| | | | | | | | 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 f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* r25118: More pstring elimination.Jeremy Allison2007-10-101-3/+11
| | | | | Jeremy. (This used to be commit 7632f8fb4003657591778d2b55f546d1737859d1)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r21369: sys_disk_free return type is SMB_BIG_UINT.Simo Sorce2007-10-101-1/+1
| | | | | | | | Fix dfree_retval to be SMB_BIG_UINT as well, otherwise we may wrap up on > 2T file systems. Simo. (This used to be commit 0bb7f6492ccf4a965d70d43ee1483959c71bcdba)
* r11190: Fix enhancement request #3192.Jeremy Allison2007-10-101-10/+53
| | | | | | | | | This does 2 things. 1). Makes dfree command a per-share parameter (it should be anyway IMHO). 2). Adds a "dfree cache time" parameter in seconds that specifies how long a dfree command output should be cached for. Default is zero (no caching). Jeremy. (This used to be commit 49ef8b88a3e12883148eb28d8e86fb07dbc3d12d)
* r5822: Actually return an error message if disk_free fails ! Pointed out by ↵Jeremy Allison2007-10-101-3/+12
| | | | | | | Ying Li <ying.li2@hp.com>. Jeremy. (This used to be commit b5d31b2caf5c4739607bf57cb7e4e0569b57012b)
* r5268: Fix bug #2310, only do 16-bit normalization on small dfreeJeremy Allison2007-10-101-5/+5
| | | | | | request. Jeremy. (This used to be commit 96dfec739a7ab6ac082d530ca2b771f9d6acabc6)
* Add NT quota support. Patch from Stefan (metze) MetzemacherAlexander Bokovoy2003-05-121-6/+6
| | | | | | | | 1. Allows to change quota settings for shared mount points from Win2K and WinXP from Explorer properties tab 2. Disabled by default and when requested, will be probed and enabled only on Linux where it works 3. Was tested for approx. two weeks now on Linux by two independent QA teams, have not found any bugs so far Documentation to follow (This used to be commit 4bf022ce9e45be85609426762ba2644ac2031326)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* Added NT_USER_TOKEN into server_info to fix extra groups problem.Jeremy Allison2001-11-031-1/+1
| | | | | | Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy. (This used to be commit ee5e7ca547eff016818ba5c43b8ea0c9fa69b808)
* get rid of compiler warnings (casts and delete unused variables)Herb Lewis2001-10-231-1/+1
| | | | (This used to be commit 51cb4411df61d1caec9d84809b1a53a6a632f808)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-3/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* The big character set handling changeover!Andrew Tridgell2001-07-041-4/+4
| | | | | | | | 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 debb471267960e56005a741817ebd227ecfc512a)
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-1/+1
| | | | | Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
* Fixed processing of dfree script (was truncating).Jeremy Allison2000-12-121-2/+0
| | | | | Jeremy. (This used to be commit 1e719a807669876b4d11f4653e9712f25fcba20b)
* file_lines_load/file_lines_pload can now optionally convert unix_to_dos()Jeremy Allison2000-12-071-1/+1
| | | | | | on read. Jeremy. (This used to be commit 76b8dd376d13eb4469417be217c966d54d333367)
* split fsusage() into a separate module (to fix linking problems withAndrew Tridgell2000-04-191-127/+2
| | | | | spoolssd in tng) (This used to be commit e2eacdd74c369fbbcd118148149321e36f3d0010)
* converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-161-11/+9
| | | | | | | | to support some of this I added the following functions in util_file.c file_lines_pload : load lines from a pipe file_pload : load a pipe into memory (This used to be commit a09470817c5b21dba42f9ef4ce5e8b768a254c0b)
* Fixes to add "paranoid" option to popen. Checks some basic things.Jeremy Allison2000-03-161-1/+1
| | | | | Jeremy (This used to be commit 3b8cbb10de322fd7a1063fb5b681790b10d24ab0)
* Added replacement functions sys_popen and sys_pclose. These are basedJeremy Allison2000-02-151-5/+5
| | | | | | | | | | on the glibc source code and are safer than the traditional popen as they don't use a shell to exec the requested command. Now we have these functions they can be tightened up (environment etc.) as required to make a safe popen. It should now be safe to add the environement variable loading code to loadparm.c Jeremy. (This used to be commit b52e92b09d4ca3b66e534f520468dee27065d048)