summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* make disk_norm() staticUri Simchoni2016-01-262-2/+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>
* vfs_gpfs: do not call disk_norm() on disk_free_fnUri Simchoni2016-01-261-2/+1
| | | | | | | This is handled at the SMB layer now. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_ceph: do not call disk_norm() on disk_free_fnUri Simchoni2016-01-261-1/+0
| | | | | | | This is handled at SMB layer now. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_fake_dfq: remove quota code from disk_freeUri Simchoni2016-01-261-96/+0
| | | | | | | | When mocking disk-free, do not take quota into account since this is now done in the SMB layer. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd: refactor disk_free handlingUri Simchoni2016-01-264-19/+24
| | | | | | | | | | | 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>
* vfs_snapper: add get_quota functionUri Simchoni2016-01-261-0/+34
| | | | | | | | | This is in preparation for handling the quota part of disk_free via the VFS - each module with a disk_free_fn should also have a get_quota_fn. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_shadow_copy2: add get_quota functionUri Simchoni2016-01-261-0/+34
| | | | | | | | | This is in preparation for handling the quota part of disk_free via the VFS - each module with a disk_free_fn should also have a get_quota_fn. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_cap: add get_quota functionUri Simchoni2016-01-261-0/+14
| | | | | | | | | This is in preparation for handling the quota part of disk_free via the VFS - each module with a disk_free_fn should also have a get_quota_fn. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs: add path parameter to get_quotaUri Simchoni2016-01-2610-40/+43
| | | | | | | | | Adding a path parameter would allow the VFS get_quota function to be used for determining the quota/usage when calculating size and free spacei. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* selftest: add disk-free and quota tests based on fake_dfq VFS moduleUri Simchoni2016-01-262-0/+175
| | | | | | | | | | | | These tests use the vfs_fake_dfq module to simulate some relations between the quota status and disk-free status. The tests will become meaningful when we take the code that does those calculations out of the VFS layer - the tests will then exercise the server code. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_fake_dfq: add vfs moduleUri Simchoni2016-01-263-0/+286
| | | | | | | | | | | | | | | Add a vfs module "vfs_fake_dfq" for mocking disk-free and user/group quota functions. In this commit there are quota considerations in disk_free calculations, based on the mocking of quota. Those considerations will later be removed once we refactor the server code to weigh the disk-free and quota in the smb layer and not in individual vfs implementations. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd: enable unit-testing of NT_TRANSACT_GET_USER_QUOTAUri Simchoni2016-01-261-1/+1
| | | | | | | | Processing of NT_TRANSACT_GET_USER_QUOTA involves a security check to see the user is an admin, allow this check to run in unit-testing mode. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* quotas: correct comment about SMB_GROUP_QUOTA_TYPEUri Simchoni2016-01-261-1/+1
| | | | | Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* loadparm: introduce lp_parm_ulonglong() and lpcfg_parm_ulonglong()Uri Simchoni2016-01-262-0/+19
| | | | | Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd:smb2_negprot: implement connection passing based on client_guidMichael Adam2016-01-261-0/+58
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* smbd:smb2_server: let smbd_server_connection_terminate() only call ↵Stefan Metzmacher2016-01-261-2/+15
| | | | | | | | | | | | exit_server() for the last connection TODO: We need to cancel pending requests on the connection and defer the talloc_free. Currently we only ever have one connection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* smbd:process: use smbXsrv_client_create.Michael Adam2016-01-261-6/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* smbd:process: treat initialized table in smbXsrv_connection_init_tablesMichael Adam2016-01-261-0/+4
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* smbd: add smbXsrv_client.cStefan Metzmacher2016-01-263-0/+787
| | | | | | | Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* smbd:globals.h: add guid_verified to smbXsrv_connection.smb2.clientMichael Adam2016-01-261-0/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* idl:smbXsrv: add smbXsrv_connection_pass structures.Stefan Metzmacher2016-01-261-0/+25
| | | | | | | | | To be used for the connection passing message. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* idl:smbXsrv: add smbXsrv_client_global structuresStefan Metzmacher2016-01-261-0/+44
| | | | | | | | | This is for marshalling smbXsrv_client. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd: only process fsctl_network_iface_info if multi channel is enabledMichael Adam2016-01-261-0/+12
| | | | | | | | | | | | This effectively disables it for now. Ultimately, we may want to remove this restriction. Hence a separate patch. 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): Tue Jan 26 10:40:44 CET 2016 on sn-devel-144
* s3:smbd: implement fsctl_network_iface_infoStefan Metzmacher2016-01-261-0/+124
| | | | | | | | | The ioctl used for detecting interfaces for multi-channel. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:lib: extend interpret_interface() to optionally read speed, caps, and ↵Michael Adam2016-01-261-0/+105
| | | | | | | | | | | | | | | | | | | | | index from config New syntax for interfaces parameter: interfaces = address[;key=value[,key=value[,...]]] - keys can be 'speed', 'capability', and 'if_index'. - speed is in bits per second. - capability can be RSS and RDMA. - if_index should be used with care, because these indexes should not conicide with indexes the kernel sets... Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:lib: remove an unmotivated comment from interpret_interface()Michael Adam2016-01-261-1/+0
| | | | | | | This seems to be a left-over from historic code. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:lib: copy speed, cap, and index in add_interface()Michael Adam2016-01-261-0/+3
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smb.h: add linkspeed, capability, and if_index to interface structMichael Adam2016-01-261-0/+3
| | | | | | | | Pair-Programmed-With: Anoop C S <anoopcs@redhat.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:lib: add braces around if-block in my_sam_name()Michael Adam2016-01-261-1/+2
| | | | | | | | | | Clean-up after moving the function. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Jan 26 03:19:18 CET 2016 on sn-devel-144
* s3:lib: remove supefluous comments from map_my_name()Michael Adam2016-01-261-5/+0
| | | | | | | cleanup after moving Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:lib: fix white spaces in my_sam_name()Michael Adam2016-01-261-6/+6
| | | | | | | Clean-up after function has been moved. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* vfs_shadow_copy2: add tests for snapsharepathUri Simchoni2016-01-261-0/+1
| | | | | Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* vfs_shadow_copy2: add snapsharepath parameterUri Simchoni2016-01-261-1/+36
| | | | | | | | | | This new parameter defines how to get from the snapshot's root directory to the share's root directory. It is an alternative to the "basedir" parameter, but functionally is a superset of basedir. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* vfs_shadow_copy2: remove basedir state variableUri Simchoni2016-01-261-19/+10
| | | | | | | | Remove the basedir state variable from the module-specific data of vfs_shadow_copy2 - this variable is not being used. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3-parm: clean up defaults when removing global parametersAlexander Bokovoy2016-01-251-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11693 When globals are re-initialized, they are cleared and globals' talloc context is freed. However, parm_table still contains a reference to the global value in the defaults. This confuses lpcfg_string_free() after commit 795c543d858b2452f062a02846c2f908fe4cffe4 because it tries to free already freed pointer which is passed by lp_save_defaults(): .... case P_STRING: case P_USTRING: lpcfg_string_set(Globals.ctx, &parm_table[i].def.svalue, *(char **)lp_parm_ptr(NULL, &parm_table[i])); .... here &parm_table[i].def.svalue is passed to lpcfg_string_free() but it is a pointer to a value allocated with previous Globals.ctx which already was freed. This specifically affects registry backend of smb.conf in lp_load_ex() where init_globals() called explicitly to re-init globals after lp_save_defaults() if we have registry backend defined. Reviewed-by: Uri Simchoni <uri@samba.org> Signed-off-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Mon Jan 25 23:58:42 CET 2016 on sn-devel-144
* s3-client: Add a KRB5 wrapper for smbspoolAndreas Schneider2016-01-253-0/+234
| | | | | | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11690 We need a wrapper for smbspool to be able to authenticate with Kerberos. This needs to replace the cups smb backend. The permission need to be 0700 and the owner root. Note that Kerberos support is broken in CUPS 2.1.2 maybe earlier versions. It works with 1.6.3. Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jan 25 19:58:46 CET 2016 on sn-devel-144
* s3:utils/smbget make use of bool for flagsChristian Ambach2016-01-251-45/+48
| | | | | | | | | | convert flags stored as int to bool Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jan 25 13:33:12 CET 2016 on sn-devel-144
* s3:utils/smbget use C99 format identifiersChristian Ambach2016-01-251-39/+29
| | | | | | | for ssize_t and off_t variables Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:utils/smbget code formatChristian Ambach2016-01-251-173/+331
| | | | | | | | | adopt the code to latest README.Coding standards e.g. curly braces everywhere, blanks before braces, obey 80 character limit (except for the popt definitions) Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:utils/smbget fix recursive downloadChristian Ambach2016-01-251-1/+14
| | | | | | | | | | get_auth_data is called multiple times (once for the directory listing and then for every file to be downloaded). Save the obtained values across multiple calls to make smbclient use the correct username for each download. Bug: https://bugzilla.samba.org/show_bug.cgi?id=6482 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:smbd: Ignore initial allocation size for directory creationRalph Boehme2016-01-231-7/+3
| | | | | | | | | | | | We reject directory creation with an initial allocation size > 0 with NT_STATUS_ACCESS_DENIED. Windows servers ignore the initial allocation size on directories. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11684 Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_sesssetup: implement SMB3 session bind (disabled)Michael Adam2016-01-231-3/+78
| | | | | | | | | | | | | | This is disabled for now. It will be possible to enabled it via a config switch once the underpinnings are complete. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat Jan 23 03:22:18 CET 2016 on sn-devel-144
* s3:smb2_sesssetup: treat BINDING in smbd_smb2_session_setup_auth_returnStefan Metzmacher2016-01-231-0/+124
| | | | | | | | | | This adds smbd_smb2_bind_auth_return(), a variant of auth_return for session binding. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smb2_negprot: announce multi channel support (disabled)Michael Adam2016-01-231-0/+8
| | | | | | | | | | | This disabled for now. Will be enabled by config setting once underpinnings are ready. Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbXsrv: introduce bool smbXsrv_client->server_multi_channel_enabledMichael Adam2016-01-231-0/+1
| | | | | | | defaulting to false. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbspool: Add string representation of nt_statusAndreas Schneider2016-01-221-2/+2
| | | | | | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jan 22 20:59:36 CET 2016 on sn-devel-144
* smbstatus: add support for SMB1 signing and CIFS UNIX extensions encryptionRalph Boehme2016-01-222-0/+89
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Jan 22 11:06:05 CET 2016 on sn-devel-144
* smbstatus: show signing state of sessions and tconsRalph Boehme2016-01-225-8/+41
| | | | | | | | | Show the signing state of sesssions tcons in smbstatus. This is SMB2/3 only. SMB1 support will be added in a later commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib/conn_tdb: store the connection dialectRalph Boehme2016-01-222-0/+4
| | | | | | | | | This will be used in a subsequent commit that will print the signing cipher in smbstatus. We need the connection dialect for that. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: add signing state tracking flagsRalph Boehme2016-01-223-2/+38
| | | | | | | | | Add flags that track the signing state of all incoming and outgoing SMB2 packets and a helper function that can be used to determine whether a session of tcon can be considered "signed". Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>