summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* s3:wscript_build: remove unused allow_warnings=True for 'smbregistry'Stefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:registry: use discard_const_p() to avoid const warning in smb_iconv() defineStefan Metzmacher2014-11-251-1/+1
| | | | | | | | | I'm wondering why we have this in reg_parse_internal.h at all! But for now just fix warnings... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:printing: fix some const warnings in print_iprint.cStefan Metzmacher2014-11-251-6/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:printing: Avoid compiler warning about unused labelKai Blin2014-11-251-0/+4
| | | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:passdb: avoid invalid pointer type warnings in pdb_wbc_sam.cStefan Metzmacher2014-11-251-6/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:passdb: always copy the history in pdb_set_plaintext_passwd()Stefan Metzmacher2014-11-251-19/+14
| | | | | | | | We should not write to memory marked as const (returned from pdb_get_pw_history())! Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:wscript_build: remove unused allow_warnings=True for 'param'Stefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:param: fix compiler warningsStefan Metzmacher2014-11-251-12/+12
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules: remove unused allow_warnings=True for non_posix_acls, and ↵Stefan Metzmacher2014-11-251-2/+0
| | | | | | | vfs_media_harmony Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules: rename variables in vfs_fruit.c to fix shadow warningsStefan Metzmacher2014-11-251-16/+16
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:librpc/idl: mark struct smbXsrv_client as [public]Stefan Metzmacher2014-11-251-1/+1
| | | | | | | | | | This avoids compiler warnings about unused code. We don't use the NDR code for this yet, will be done when we get multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:wscript_build: remove unused allow_warnings=True for 'ads'Stefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libads: avoid some compiler warnings in ldap.cStefan Metzmacher2014-11-251-15/+19
| | | | | | | | We use helper variables and explicit casts using discard_const_p() to avoid bogus const warnings. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: remove unused variables in cliconnect.cStefan Metzmacher2014-11-251-3/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib/netapi/examples: fix pointer from integer error in nltest.cStefan Metzmacher2014-11-251-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib/netapi/tests: fix invalid switch enum level warningStefan Metzmacher2014-11-251-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib: fix/simplify srprs_hex()Stefan Metzmacher2014-11-251-10/+6
| | | | | | | | | | | | | | | | | | | | | There're a few problems with this function. - it pretends to support values up to UINT64_MAX in it only returns 'unsigned' which support only values up to UINT32_MAX. Currently we only have callers with len=2 and len=8, so it's not a triggered bug. We just allow (len >= 1 && len <= 8) now. - The compiler is not able to inspect the format string to sscanf(). We copy up to 8 bytes into a stack buffer and always pass "%8x" to sscanf. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-smbstatus: Fix exit code of profile output.Andreas Schneider2014-11-241-2/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10961 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Nov 24 21:13:51 CET 2014 on sn-devel-104
* messaging3: Fix sending large messages on FreeBSDVolker Lendecke2014-11-241-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* unix_msg: Reformat unix_dgram_send a bitVolker Lendecke2014-11-241-1/+3
| | | | | | | This makes the next commit a bit more readable Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-smbclient: Return success if we listed the shares.Andreas Schneider2014-11-241-1/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10960 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_streams_xattr: check stream typeRalph Boehme2014-11-221-0/+6
| | | | | | | | | | | Only allow access to the stream type "$DATA". vfs_streams_depot does this too and it fixes the failing test "smb2.streams.names". Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Nov 22 01:07:54 CET 2014 on sn-devel-104
* vfs_streams_xattr: initialize pointerRalph Boehme2014-11-211-1/+1
| | | | | | | | Intitialize pointer to NULL, otherwise we talloc_free() an unitialized pointer in the error code path. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_streams_xattr: fix check with samba_private_attr_name()Ralph Boehme2014-11-211-3/+18
| | | | | | | | | | | | | | | We want to check with samba_private_attr_name() whether the xattr name is a private one, unfortunately it flags xattrs that begin with the default streams prefix as private. By only calling samba_private_attr_name() in case the xattr does NOT begin with the default prefix, we know that if it returns 'true' it definitely one of our internal xattr like "user.DOSATTRIB". This fixes a bug introduced in 634bcb09a08b927fd79ae0e16aeee2a123605f94 that denied all access to valid stream xattrs. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: fix some function header comments.Michael Adam2014-11-201-3/+3
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Nov 20 18:45:28 CET 2014 on sn-devel-104
* s3:smbprofile: profile async pread/pwrite/fsync syscallsStefan Metzmacher2014-11-192-0/+13
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 19 23:13:10 CET 2014 on sn-devel-104
* s3:smbprofile: track connect_count and disconnect_countStefan Metzmacher2014-11-193-0/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: remove unused {START,END}_PROFILE_STAMP()Stefan Metzmacher2014-11-191-19/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: report idle state of 'idle_count' and 'idle_time'Stefan Metzmacher2014-11-192-9/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: improve profiling for the security context switching.Stefan Metzmacher2014-11-192-4/+25
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: count all SMB1 and SMB2 requests as 'request_count'Stefan Metzmacher2014-11-193-2/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: use async smbprofile macrosStefan Metzmacher2014-11-196-113/+97
| | | | | | | | This improves profiling and corrently counts the total and idle time for async requests. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: rewrite the internal macrosStefan Metzmacher2014-11-193-1728/+686
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now autogenerate a lot of code using SMBPROFILE_STATS_ALL_SECTIONS macro which expands to different SMBPROFILE_STATS_{COUNT,BASIC,BYTES,IOBYTES} macros. This also allows async profiling using: struct mystate { ... SMBPROFILE_BASIC_ASYNC_STATE(profile_state); ... }; ... SMBPROFILE_BASIC_ASYNC_START(SMB2_negotiate, profile_p, mystate->profile_state); ... SMBPROFILE_BYTES_ASYNC_SET_IDLE(mystate->profile_state); ... SMBPROFILE_BYTES_ASYNC_SET_BUSY(mystate->profile_state); ... SMBPROFILE_BASIC_ASYNC_END(mystate->profile_state); The current START_PROFILE*()/END_PROFILE*() are implemented as legacy wrappers. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: Use "smbd profiling level"Volker Lendecke2014-11-191-6/+6
| | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: add "smbd profiling level" optionVolker Lendecke2014-11-191-0/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: Make "status_profile.h" a proper headerVolker Lendecke2014-11-194-6/+31
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: Make smbprofile.h includable on its ownVolker Lendecke2014-11-191-0/+2
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: improve writecache profilingStefan Metzmacher2014-11-194-43/+79
| | | | | | | | | | | | | | | | | In order to have useful profiling counters should never be decremented. We need a separate counter for deallocation events. The current value can be calculated by allocations - deallocations. We also use better names and avoid having an array for the flush reasons. This will simplify further profiling improvements a lot. The value writecache_num_write_caches (this was similar to writecache_allocations) is replaced by writecache_cached_writes, which counts the amount of writes which were completely handled by the cache. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:wscript_build: remove unused to dependency from 'smbtree' to 'PROFILE'Stefan Metzmacher2014-11-191-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: remove unused nmbd related countersStefan Metzmacher2014-11-193-165/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:nmbd: remove START/END_PROFILE() callsStefan Metzmacher2014-11-194-51/+11
| | | | | | | nmbd never calls profile_setup() and never collects any profiling data. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules: make use of END_PROFILE_BYTES() when START_PROFILE_BYTES() was usedStefan Metzmacher2014-11-191-6/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: add END_PROFILE_BYTES() marcoStefan Metzmacher2014-11-191-0/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* samba: pass down size_t instead of int to add_string_to_array().Günther Deschner2014-11-178-10/+12
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Mon Nov 17 19:53:22 CET 2014 on sn-devel-104
* s3-proto: remove duplicate proto for add_string_to_array().Günther Deschner2014-11-171-3/+0
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dbwrap_ctdb: Pass on mutex flags to tdb_openVolker Lendecke2014-11-161-1/+2
| | | | | | | | | | | | | | Without this, ctdb can create a tdb file with mutex activated, but the local tdb_open will not open the tdb due to strict flags checks whether mutexes are possible. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10922 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Nov 16 12:13:54 CET 2014 on sn-devel-104
* s3:lib: fix const warnings in popt_common.cStefan Metzmacher2014-11-151-3/+6
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Nov 15 01:46:13 CET 2014 on sn-devel-104
* s3:auth: add some const to user_in_list()Stefan Metzmacher2014-11-142-3/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:auth: add missing auth_samba4_init() prototypeStefan Metzmacher2014-11-141-0/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* fsrvp: define FSRVP_E_SHADOWCOPYSET_ID_MISMATCHDavid Disseldorp2014-11-141-1/+5
| | | | | | | | This was recently added to the [MS-FSRVP] specification with the errata http://msdn.microsoft.com/en-us/library/dn785066.aspx#BKMK_FSRVP Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>