Michael Adam
8185d31fb0
s3:registry: replace typedef REGISTRY_VALUE by struct regval_blob
...
Michael
2009-04-27 11:21:03 +02:00
Michael Adam
221151a2a2
s3:registry: replace typedef REGVAL_CTR by struct regval_ctr.
...
This paves the way for hiding the typedef and the implementation
from the surface.
Michael
2009-04-27 11:21:02 +02:00
Michael Adam
38d02c5d85
s3:net conf: support dangling parameters by specifying "" as the section name.
...
for {get,set,del}parm
Michael
2009-04-27 11:21:02 +02:00
Michael Adam
cf9b027709
s3:fix build of the pam_smbpass shared module
...
Michael
2009-04-27 11:21:01 +02:00
Jeremy Allison
bd5c2c7dc8
find/replace. Change uintX types to uintX_t types to tidy up the code.
...
Jeremy.
2009-04-24 07:06:48 -07:00
Günther Deschner
e28071f79a
s3-libnetjoin: make acct_flags dependent on secure channel type.
...
Guenther
2009-04-24 14:38:28 +02:00
Günther Deschner
37f491e5e3
s3-libnetjoin: add support for WKSSVC_JOIN_FLAGS_JOIN_UNSECURE.
...
Guenther
2009-04-24 14:38:19 +02:00
Günther Deschner
16b2f4b55a
s3-svcctl: indicate that the spooler is already running if it does.
...
Guenther
2009-04-24 13:38:43 +02:00
Günther Deschner
aa26bdd719
s3-svcctl: fix _svcctl_ControlService.
...
Guenther
2009-04-24 13:38:34 +02:00
Günther Deschner
67588ca80d
s3-idmap: Fix bug #6286 : Call init function for builtin idmap modules before probing for them as shared modules.
...
idmap-gurus of the world, please check.
Guenther
2009-04-24 10:02:06 +02:00
Günther Deschner
c9ec012e12
s3-build: refactor LIBNET_OBJ.
...
Guenther
2009-04-24 09:53:09 +02:00
Günther Deschner
8d3e61e5ce
s3-netlogon: Start fixing rpccli_netlogon_setup_creds after auth merge.
...
Guenther
2009-04-24 09:52:00 +02:00
Jelmer Vernooij
b6981e79df
samba3/ldb: Update the ldb_dn API to match that of the Samba 4 LDB:
...
* ldb_dn_new() now takes an initial DN string
* ldb_dn_string_compose() -> ldb_dn_new_fmt()
* dummy ldb_dn_validate(), since LDB DNs in the current implementation
are always valid if they could be created.
2009-04-23 18:27:32 +02:00
Jelmer Vernooij
9b64073cf7
ldb/samba3: Support event context argument to ldb_init().
...
This argument is ignored (Samba3's LDB is synchronous) but having it
there is useful for API compatibility with the LDB used by Samba 4 and
available on some systems.
2009-04-23 18:27:31 +02:00
Jelmer Vernooij
598f78bd1f
charcnv: Import push_codepoint().
2009-04-23 17:50:18 +02:00
Volker Lendecke
652dc40f0d
Add missing prototypes
2009-04-23 16:46:01 +02:00
Volker Lendecke
1722859abd
Revert "Do not use the file system GET_REAL_FILENAME for mangled names"
...
This reverts commit b5b6ecb58a
.
2009-04-23 14:54:52 +02:00
Volker Lendecke
2146310fb7
Fix a couple of warnings
2009-04-23 14:35:50 +02:00
Volker Lendecke
b8cd1cff2d
Fix an uninitialized variable
2009-04-23 14:35:50 +02:00
Volker Lendecke
d7208577f2
Fix a type-punned warning
2009-04-23 14:35:50 +02:00
Volker Lendecke
546d16500d
Fix a pointless static
2009-04-23 13:46:29 +02:00
Jeremy Allison
96932593df
Fix coverity #901 - uninitialized data.
...
Jeremy.
2009-04-23 02:51:55 -07:00
Jeremy Allison
6610327770
Fix Coverity bug #902 , uninitialized variable.
...
Jeremy.
2009-04-23 02:02:28 -07:00
Jeremy Allison
2012770393
Fix coverity #908 , #909 , uninitialized variable.
...
Jeremy.
2009-04-23 01:47:04 -07:00
Volker Lendecke
5abdc58f98
Fix Coverity ID 884: DEADCODE
2009-04-23 10:44:51 +02:00
Jeremy Allison
1e315b0013
Fix coverity #910 , uninitialized variable.
...
Jeremy.
2009-04-23 01:38:21 -07:00
Günther Deschner
59fe99027d
s3-selftest: test wbinfo --allocate-uid/gid.
...
Guenther
2009-04-23 10:30:32 +02:00
Kai Blin
c93e2d9d43
errormap: Change the WBC_ERR_UNKNOWN_ERROR to map to NT_STATUS_UNSUCCESSFUL
...
This allows us to distinguish on NTSTATUS level if we got a
WBC_ERR_UNKNOWN_ERROR or WBC_ERR_NSS_ERROR.
2009-04-23 00:23:56 +02:00
Jeremy Allison
455f2a4c65
Make dskattr async.
...
Jeremy.
2009-04-22 08:04:53 -07:00
Björn Jacke
740c2c4366
ѕ3/configure: fix regexp for ld version recognition
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-04-22 16:05:36 +02:00
Simo Sorce
40793e7763
Fix profile acls in some corner cases
...
Always add back the real original owner of the directory in the ACE List after
we steal its ACE for the Administrators group.
2009-04-22 09:59:02 -04:00
Simo Sorce
ff3a020a5f
Avoid duplicate aces
...
When adding arbitrary aces to an nt_ace_list we need to make sure we
are not actually adding a duplicate.
add_or_replace_ace() takes care of doing the right thing.
2009-04-22 09:58:51 -04:00
Jeremy Allison
502f47c7c0
Make cli_chkpath async.
...
Jeremy
2009-04-22 06:46:42 -07:00
Volker Lendecke
8bc88aae5d
Move serverinfo_to_SamInfo3() to rpc_server/
...
Normally I hate moving around stuff, but this function is only called from the
RPC server side and it pulls in passdb when trying to link in our rpc client
routines. That seems unnecessary to me.
2009-04-22 12:33:46 +02:00
Jeremy Allison
e7466d0207
Add comment explaining the previous fix.
...
Jeremy.
2009-04-22 03:03:04 -07:00
Jeremy Allison
265ffe01f2
Fix bug #6279 - winbindd crash. Cope with LDAP libraries returning LDAP_SUCCESS but not returning a result.
...
Jeremy
2009-04-22 02:58:24 -07:00
Volker Lendecke
a3efd9d797
Fix some nonempty blank lines
2009-04-22 11:52:07 +02:00
Volker Lendecke
e77c17ec3e
Remove some shadowed definition warnings
2009-04-22 11:19:13 +02:00
Kai Blin
7a9be21916
errormap: Add wbcErr to NTSTATUS mappings
2009-04-22 00:14:45 +02:00
Jelmer Vernooij
f4195183a4
s3: Use common security_descriptor_equal().
2009-04-21 18:17:40 +02:00
Stefan Metzmacher
14bbed1d67
s3:libsmb: always use the tevent_req_nomem() for checking allocation failures
...
This will also make sure we cleanup 'req' in case of an error.
metze
2009-04-21 17:42:39 +02:00
Jeremy Allison
5ccf58ff59
Make rmdir async.
...
Jeremy.
2009-04-21 06:52:54 -07:00
Jelmer Vernooij
2eff2de2f8
Move the security_descriptor utility code to the top-level.
2009-04-21 15:14:35 +02:00
Jeremy Allison
dfc79de607
Make cli_mkdir async. Change it to return NTSTATUS.
...
Jeremy.
2009-04-21 05:52:34 -07:00
Volker Lendecke
4024abb0a8
Remove "struct samr_info"
2009-04-21 14:18:34 +02:00
Volker Lendecke
3f39df75d8
Fix _samr_QuerySecurity
2009-04-21 14:18:34 +02:00
Volker Lendecke
512cf3ea24
Fix samr_SetSecurity
2009-04-21 14:18:34 +02:00
Günther Deschner
d94bbb3167
s3-secdesc: remove SEC_RIGHT_MAXIMUM_ALLOWED and SEC_RIGHT_SYSTEM_SECURITY.
...
We had up to three incarnations of these flags in Samba3.
Guenther
2009-04-21 13:01:29 +02:00
Günther Deschner
38264bb3b8
s3-secdesc: move all winreg access bits to IDL.
...
Guenther
2009-04-21 12:42:51 +02:00
Günther Deschner
da92e54236
s3-secdesc: use SEC_FLAG_SYSTEM_SECURITY instead of SEC_RIGHT_SYSTEM_SECURITY.
...
Guenther
2009-04-21 12:40:47 +02:00
Günther Deschner
1bb093aea9
s3-secdesc: use SEC_FLAG_MAXIMUM_ALLOWED instead of SEC_RIGHT_MAXIMUM_ALLOWED.
...
Guenther
2009-04-21 12:40:47 +02:00
Günther Deschner
b5bec1a6d7
s3-secdesc: use SEC_FLAG_MAXIMUM_ALLOWED instead of SEC_RIGHTS_MAXIMUM_ALLOWED.
...
Guenther
2009-04-21 12:40:47 +02:00
Volker Lendecke
922f836b82
Convert the alias handles to type-safe policy handles
2009-04-21 12:02:28 +02:00
Volker Lendecke
228c56f8ec
Convert the group handles to type-safe policy handles
2009-04-21 12:02:28 +02:00
Volker Lendecke
95a76d3c98
Convert the user handles to type-safe policy handles
2009-04-21 12:02:28 +02:00
Jelmer Vernooij
4c32978d97
Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if
...
the system one is broken.
2009-04-20 23:58:26 +02:00
Günther Deschner
6fc40ce0d3
libgpo: fix the build of gpext plugins.
...
Guenther
2009-04-20 23:38:11 +02:00
Wilco Baan Hofman
171a361375
Fix ini parsing in the s3 gpext modules. Fix ini parser API. Make the build work
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:17 +02:00
Wilco Baan Hofman
933482e648
Move gpo_ini stuff to the main libgpo. Make gpo_ini use a common parser.
...
It now makes use of lib/util/param.c to parse ini files.
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:17 +02:00
Wilco Baan Hofman
3e010e3eb8
Adjust samba 3 to the new gpo API. Still untested code.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:17 +02:00
Wilco Baan Hofman
248554370a
Make gpo_ldap.c compatible with samba 4. Add ads_get_ldap_server_name() function to samba 3. Move prototypes to root libgpo where appropriate.
...
gpo_ldap.c now compiles for both samba 3 and 4.
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:16 +02:00
Wilco Baan Hofman
c441b7dda8
Add ads convenience functions to samba 4. Move gpo_ldap.c to root libgpo.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:16 +02:00
Jelmer Vernooij
7761850b1f
Move gpo_fetch to top-level.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:16 +02:00
Jelmer Vernooij
d2bd5895cf
Move gpo_sec to top-level.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:16:16 +02:00
Jelmer Vernooij
cecd142f2b
Move some libgpo files to root.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-20 23:15:43 +02:00
Andrew Bartlett
a11ecbbff0
Merge branch 'master' of ssh://git.samba.org/data/git/samba into libcli-auth-merge-without-netlogond
2009-04-20 17:19:45 +02:00
John H Terpstra
f493755aaf
Added ability to revert to old modules for make revert.
2009-04-20 10:13:10 -05:00
Andrew Bartlett
c185e7a29c
Fix to use modified cli_rpc_pipe_open_schannel_with_key API
2009-04-20 17:04:33 +02:00
Andrew Bartlett
6c9caed481
Merge commit 'origin/master' into libcli-auth-merge-without-netlogond
2009-04-20 16:53:02 +02:00
Volker Lendecke
e3db09cf02
Do not vasprint stuff where not necessary
2009-04-20 16:51:44 +02:00
Andrew Bartlett
53765c81f7
Remove use of talloc_reference in cli_rpc_pipe_open_schannel_with_key()
2009-04-20 16:50:49 +02:00
Jelmer Vernooij
31120c9eac
Move syslog check out of m4 library file into configure.in
2009-04-20 16:25:17 +02:00
Jelmer Vernooij
fbf4293d7e
Move check for syslog out of libreplace to source3/ and source4/.
...
This should help compiling talloc on Windows.
2009-04-20 16:25:16 +02:00
Volker Lendecke
a6cb470892
Reproduce a bug with a custom GET_REAL_FILENAME
2009-04-20 15:17:35 +02:00
Volker Lendecke
b5b6ecb58a
Do not use the file system GET_REAL_FILENAME for mangled names
2009-04-20 14:05:13 +02:00
Jeremy Allison
86b0d56897
Fix warning in use of talloc_set_name.
...
Jeremy.
2009-04-20 04:05:12 -07:00
Andrew Bartlett
ddcc355f2b
s3:ntlmssp Remove use of talloc(NULL) in NTLMSSP code
2009-04-20 11:55:49 +02:00
Volker Lendecke
4afcde91b9
Convert the domain handles to type-safe policy handles
2009-04-20 08:27:23 +02:00
Günther Deschner
62480385c1
s3-printing: use ARRAY_SIZE() macro in forms functions.
...
Guenther
2009-04-20 01:06:01 +02:00
Günther Deschner
d9aaf3759a
s3-printing: use sec_initial_uid() instead "0" in print_access_check().
...
Another babystep in order to make us pass RPC-SPOOLSS.
Guenther
2009-04-20 00:59:36 +02:00
Volker Lendecke
dd073a333e
Make force_flush_samr_cache use a dom_sid to find what to flush
2009-04-19 22:58:06 +02:00
Andrew Bartlett
8ee7b4ce29
s3:auth Fix segfault: Always initialise returned session keys
2009-04-19 21:50:13 +02:00
Andrew Bartlett
0c771bfc70
s3:ntlmssp Fix segfault: msrpc_gen now uses talloc()
2009-04-20 05:19:48 +10:00
Volker Lendecke
46317ce214
Remove flag "builtin_domain" from disp_info
2009-04-19 11:39:47 +02:00
Volker Lendecke
bf196df52f
Remove flag "builtin_domain" from samr_info
2009-04-19 09:27:15 +02:00
Volker Lendecke
386511b8e1
Make get_samr_info_by_sid use recent coding conventions
2009-04-19 09:27:15 +02:00
Volker Lendecke
35e6a0e618
Add "uint32_t access_granted" to policy handles
...
All policy handles have a mask of allowed operations attached that were
calculated at creation time, so they should carry this mask. This is the basis
for consolidating all our policy handle access checks.
If you want to do your own more complicated access checks further down, just
pass "0" to policy_handle_find.
2009-04-19 09:27:15 +02:00
Volker Lendecke
9b3f2e69f7
Make "struct policy" private to srv_lsa_hnd.c
2009-04-19 09:27:14 +02:00
Volker Lendecke
fa4ff87acd
Convert the samr connect_handles to type-safe calls
2009-04-18 13:58:48 +02:00
Volker Lendecke
c9bc1728f9
Add type-safe policy_handle_create/find
2009-04-18 13:58:48 +02:00
Volker Lendecke
fd558b37f6
Add some const
2009-04-18 13:58:48 +02:00
Günther Deschner
81b18464be
s3-spoolss: remove some direct checks for 0 uid in AddForm,SetForm,DelForm.
...
Also add some become_root()/unbecome_root() pairs which were missing IMHO.
Guenther
2009-04-17 23:20:22 +02:00
Stefan Metzmacher
257809558b
s3:net: add --request-timeout option
...
metze
2009-04-17 21:46:47 +02:00
Stefan Metzmacher
c0dfe0cf80
s3:net_rpc: don't shutdown a cli_state passed from the caller
...
This fixes a crash bug if we timeout in net rpc trustdom list.
metze
2009-04-17 21:46:46 +02:00
Günther Deschner
6f90cdaf63
s3-selftest: enable RPC-SPOOLSS.
...
Guenther
2009-04-17 17:28:23 +02:00
Günther Deschner
6900d61d36
s3-spoolss: add support for _spoolss_EnumPrinterDrivers() level 6.
...
Guenther
2009-04-17 17:27:32 +02:00
Günther Deschner
5e563ee508
s3-spoolss: add support for _spoolss_EnumPrinterDrivers() level 5.
...
Guenther
2009-04-17 17:27:26 +02:00
Günther Deschner
d76837f6da
s3-spoolss: add support for _spoolss_EnumPrinterDrivers() level 4.
...
Guenther
2009-04-17 17:27:18 +02:00
Michael Adam
d43a49d449
s3: make installmo and uninstallmo scripts executable
...
Michael
2009-04-17 15:57:30 +02:00
Michael Adam
bf1b7ba480
s3: Fix uninstallmo
...
Michael
2009-04-17 15:57:30 +02:00
Günther Deschner
4f9d3400e5
s3-selftest: samba 3 also passes RPC-JOIN so enable it.
...
Guenther
2009-04-17 15:14:44 +02:00
Michael Adam
8c023fea86
s3:registry: Prevent creation of keys containing the '/' character.
...
This creates a broken registry that can only be fixed with
tdbtool, since the '/' sign is used as a key separator after
normalization at a lower level.
This makes e.g. "net conf setparm abc/def comment xyz" fail with
WERR_INVALID_PARAM, which is much more desirable than a broken
registry.tdb.
Michael
2009-04-17 11:46:14 +02:00
Günther Deschner
0ba833f3ee
s3-samr: set the builtin_domain bool flag in get_samr_dispinfo_by_sid().
...
Volker, please check.
Found by torture test RPC-SAMR-PASSWORDS-PWDLASTSET (which we pass with
this fix).
Guenther
2009-04-17 11:21:20 +02:00
Günther Deschner
490f6c418d
s3-selftest: enable RPC-SAMR-PASSWORDS-PWDLASTSET whilte testing Samba3.
...
Guenther
2009-04-17 11:16:00 +02:00
Jim McDonough
1214bf606d
Merge branch 'master' of /home/jmcd/samba/git.samba.org/samba-master into mymaster
2009-04-17 09:28:01 +02:00
Günther Deschner
deb719a62e
s3-selftest: enable RPC-LSA-LOOKUPSIDS against samba 3.
...
Guenther
2009-04-17 01:32:45 +02:00
Jeremy Allison
37b1b9cfe9
Add torture tester to ensure we don't regress the ulogoff bug.
...
Jeremy.
2009-04-16 16:22:37 -07:00
Jeremy Allison
d55ec4fd23
Fix bug found by Tim Prouty, logging off and then re-using a vuid can cause smbd to
...
access a freed structure.
Jeremy.
2009-04-16 16:22:30 -07:00
Jeremy Allison
265829c32f
When doing a cli_ulogoff don't invalidate the cnum, invalidate the vuid.
...
Jeremy.
2009-04-16 15:16:28 -07:00
Jeremy Allison
6fc8ed7b1f
Fix IDL licensing file that got missed when IDL files were moved.
...
Jeremy.
2009-04-16 12:09:16 -07:00
Jim McDonough
75ccf934ac
Don't look up local user for remote changes, even when root.
2009-04-16 17:14:29 +02:00
Volker Lendecke
32a36e4703
Add notify_onelevel.tdb
...
This optimizes non-recursive notifys. For non-recursive notifies we can use a
per-directory file-id indexed notify record. This matters for the Windows
Explorer and IIS cases which do not use recursive notifies. In these cases, we
do not have to shuffle around the whole notify record on every change.
For the cluster case, this improves correctness of the notifies, ctdb only
distributes the tdb seqnum once a second, so we can lose notifies.
2009-04-16 15:07:06 +02:00
Volker Lendecke
ea3a022ca3
Rename notify_context->db to db_recursive
2009-04-16 15:07:06 +02:00
Martin Schwenke
448b434a86
In net_conf_import, start a transaction when importing a single share.
...
Commit d69c3db9d44ad5d9fd1f5d7a9499f3bd79ecfb47 caused the transaction
start to be conditional but the commit is still unconditional, so an
error occurs when importing a single share.
An alternate fix would be to return the transaction start to be
unconditional but then it would occur before other error checking.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Michael Adam <obnox@samba.org>
2009-04-16 10:38:38 +02:00
Andrew Bartlett
34193cffc0
Fix crash bug in NTLMSSP caused by msrpc_parse() moving to talloc
2009-04-16 14:08:00 +10:00
Günther Deschner
14304fc5e5
s3-lsa: Fix Bug #6263 . Unexpected LookupSids reply crashes XP pre-SP3.
...
LookupSids needs to bounce back string sids in case of NT_STATUS_NONE_MAPPED.
Guenther
(cherry picked from commit 1c9266c8ca
)
2009-04-16 01:52:56 +02:00
Jeremy Allison
d9804ae3cc
Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+
...
What a difference a name makes... :-). Just because something is missnamed
SAMR_ACCESS_OPEN_DOMAIN, when it should actually be SAMR_ACCESS_LOOKUP_DOMAIN,
don't automatically use it for a security check in _samr_OpenDomain().
Jeremy.
2009-04-15 15:40:00 -07:00
Andrew Bartlett
4678d1c6f4
Merge branch 'master' of ssh://git.samba.org/data/git/samba into libcli-auth-merge-without-netlogond
2009-04-15 14:36:13 +10:00
Günther Deschner
4721be488c
s3-spoolss: Fix format of description string in spoolss_PrinterInfo1.
...
This is what windows does and should get us closer to show the appropriate
printer location string in explorer.
Guenther
2009-04-14 23:21:47 +02:00
Günther Deschner
ca3de0103b
netdomjoin-gui: make sure to grey out change fields when not running as root.
...
Guenther
2009-04-14 23:06:30 +02:00
Günther Deschner
1b9384a11f
s3-nsswitch: fix make test_wbpad.
...
Guenther
2009-04-14 14:56:59 +02:00
Günther Deschner
fa302020ee
s3-svcctl: fix memcpy in _svcctl_EnumServicesStatusW().
...
Make sure we are not copying more than what we have as valid data.
Fix from Jeremy. Thanks a lot for watching this so closely!
Guenther
2009-04-14 12:13:24 +02:00
Günther Deschner
e3ceb0c653
s3-spoolss: remove unused dup_nt_devicemode().
...
Guenther
2009-04-14 12:13:17 +02:00
Andrew Bartlett
32062013c3
s3: Fix ntlm_auth and winbindd to use new common libcli/auth APIs
2009-04-14 19:33:04 +10:00
Andrew Bartlett
baf7274fed
Make Samba3 use the new common libcli/auth code
...
This is particuarly in the netlogon client (but not server at this
stage)
2009-04-14 16:23:44 +10:00
Andrew Bartlett
df8e1908ef
Use common samsync delta decryption functions in libnet_samsync.c
...
Andrew Bartlett
2009-04-14 16:23:43 +10:00
Andrew Bartlett
27815a71a9
More work to adapt to merged libcli/auth function prototypes
2009-04-14 16:23:42 +10:00
Andrew Bartlett
fe0f0e5670
Adapt to common crypto functions: sam_pwd_hash() -> sam_rid_crypt()
2009-04-14 16:23:42 +10:00
Andrew Bartlett
f28f113d8e
Rework Samba3 to use new libcli/auth code (partial)
...
This commit is mostly to cope with the removal of SamOemHash (replaced
by arcfour_crypt()) and other collisions (such as changed function
arguments compared to Samba3).
We still provide creds_hash3 until Samba3 uses the credentials code in
netlogon server
Andrew Bartlett
2009-04-14 16:23:35 +10:00
Andrew Bartlett
872cb0257c
Move DRSUAPI per-attribute decryption into a common file
...
This file (contining metze's decryption routines) is now also be used by
Samba3's DRSUAPI implementation
Andrew Bartlett
2009-04-14 14:19:39 +10:00
Andrew Bartlett
786447dea0
s3:charcnv remove now unused malloc() based conversion functions
2009-04-14 12:54:13 +10:00
Andrew Bartlett
97af7f1ed1
Add some harmless use of talloc_tos() in ntlm_auth
2009-04-14 12:54:12 +10:00
Andrew Bartlett
3b3e21bd9b
Convert Samba3 to use the common lib/util/charset API
...
This removes calls to push_*_allocate() and pull_*_allocate(), as well
as convert_string_allocate, as they are not in the common API
To allow transition to a common charcnv in future, provide Samba4-like
strupper functions in source3/lib/charcnv.c
(the actual implementation remains distinct, but the API is now shared)
Andrew Bartlett
2009-04-14 12:53:56 +10:00
Andrew Bartlett
4786a493f7
Solve some of the conflict between Samba3 and Samba4 push_string
...
This renames push_string in Samba3 into push_string_base and
push_string_check for the two different use cases.
This should allow push_string to be imported from Samba4, using it's
calling conventions.
2009-04-14 12:11:00 +10:00
Günther Deschner
fc056e561b
s3-rpcclient: add set_job command.
...
Guenther
2009-04-13 23:45:52 +02:00
Günther Deschner
a79e1ce048
s3-spoolss: fix typo in fill_printer_driver_info3().
...
Guenther
2009-04-13 23:45:12 +02:00
Günther Deschner
e1a76de03a
s3-loadparm: Fix resume command typo for "printing = vlp".
...
Guenther
2009-04-13 17:08:17 +02:00
Günther Deschner
3ef0b8671d
s3-spoolss: Fix permission checks for _spoolss_AddForm,SetForm and DelForm.
...
Found by smbtorture test.
Guenther
2009-04-13 16:15:32 +02:00
Günther Deschner
97ffd709f8
s3-spoolss: use enumprinterdrivers_level() for level 3 enum.
...
Guenther
2009-04-13 16:12:56 +02:00
Günther Deschner
9b3d3e8aeb
s3-spoolss: use enumprinterdrivers_level() for level 2 enum.
...
Guenther
2009-04-13 16:12:49 +02:00
Günther Deschner
f325c34203
s3-spoolss: use enumprinterdrivers_level() for level 1 enum.
...
Guenther
2009-04-13 16:12:42 +02:00
Günther Deschner
0393c99302
s3-spoolss: add generic enumprinterdrivers_level function.
...
Guenther
2009-04-13 16:12:35 +02:00
Volker Lendecke
94d3047de1
Use convert_string_talloc, thanks Andrew!
2009-04-13 09:30:18 +02:00
Volker Lendecke
3c10d06524
We have to deny a level 2 oplock if kernel oplocks are enabled
...
The second r/o opener of a file is supposed to get a level2 oplock. The first
opener due to the protection in process_oplock_break_message() has been forced
to break to no oplock. The second opener according to locking.tdb gets a level2
oplock. Further down in open_file_ntcreate we try to set this level2 oplock in
the kernel, and the non-clustered Linux kernel disallows this. The rules for
the kernel leases are a bit baroque, but the attempt to do the SETLEASE
correctly fails and we end up with no oplock for any client.
In the clustered case however the linux kernel on the second opening node has
not seen the open fd of the first node, it is only the cluster fs that has this
information. If the cluster fs does not have the very same notion of leases as
the local kernel has, we can end up with a WRLCK style kernel lease for the
second opener where locking.tdb only indicates a level2 oplock. Getting a
kernel oplock break signal with just a level2 oplock in locking.tdb is
something smbd is not prepared for. For example after sending out the break in
response to the kernel signal we set a timeout, waiting for a reply.
More work needs to be done to make level2 kernel oplocks real for us. This
patch addresses a real problem we have right now without them.
2009-04-12 14:56:23 +02:00
Volker Lendecke
602059a6ab
Fix a bug in smbclient not sending the correct called name
...
Jeremy, I think the ability to say
smbclient //foo/bar -I <ip-address> -p 139
making the called name to "foo" got lost with 3d2d0203
. Was this removed
deliberately? If so, please revert this patch. If not, please merge
appropriately.
Thanks,
Volker
2009-04-12 14:51:15 +02:00
Volker Lendecke
b742b4547e
Add "netbios retarget"
...
This is fun -- XP still does this :-)
netbios retarget : foo = 192.168.234.10:1139
and if you connect to port 139 name foo, XP will happily do SMB over 1139
2009-04-12 14:51:15 +02:00
Volker Lendecke
dcda3ab8ca
Reactivate get_socket_port
2009-04-12 14:51:15 +02:00
Volker Lendecke
c344ad3043
write_data already guarantees everything was written
2009-04-12 14:51:15 +02:00
Volker Lendecke
a36472dd38
Extract and print the server name type the client connects to
2009-04-12 14:51:15 +02:00
Volker Lendecke
e9569ae925
Fix some nonempty blank lines
2009-04-11 11:06:21 +02:00
Volker Lendecke
5fc9ca93f3
Fix a memleak in an unlikely error path in change_notify_create()
2009-04-11 11:06:21 +02:00
Volker Lendecke
ea6094d2cb
Use talloc_tos() for a temp convert_string_allocate()
2009-04-11 11:06:21 +02:00
Jeremy Allison
2ff80f0d76
Link in the threads functions, not yet used.
...
Jeremy.
2009-04-10 14:45:45 -07:00
Günther Deschner
bc5cd07764
s3-spoolss: implement dummy _spoolss_AddPort().
...
Guenther
2009-04-10 13:25:09 +02:00
Günther Deschner
65ee4ae30b
s3-spoolss: add support for level 8 in _spoolss_GetPrinter().
...
Guenther
2009-04-10 13:25:01 +02:00
Günther Deschner
bcd042e595
s3-eventlog: implement _eventlog_FlushEventLog().
...
Guenther
2009-04-10 13:15:25 +02:00
Günther Deschner
9b585a1282
s3-eventlog: implement _eventlog_GetLogInformation().
...
Guenther
2009-04-10 13:15:24 +02:00
Jeremy Allison
7f10bf980e
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
2009-04-09 22:46:59 -07:00
Jeremy Allison
f8f68703da
Fix bug #6254 - PUT/GET produces an error in IPv6 to a smb-server(3.3) has parameter "msdfs root = yes"
...
This was broken by the refactoring around create_file().
MSDFS pathname processing must be done FIRST.
MSDFS pathnames containing IPv6 addresses can
be confused with NTFS stream names (they contain
":" characters.
Jeremy.
2009-04-09 22:44:56 -07:00
Günther Deschner
f930f504e1
s3-selftest: enable the RPC-NTSVCS torture test against Samba3.
...
Guenther
2009-04-10 01:07:01 +02:00
Günther Deschner
b7caf13851
s3-ntsvcs: fix _PNP_GetDeviceList and _PNP_GetDeviceListSize.
...
Guenther
2009-04-10 01:06:57 +02:00
Günther Deschner
ade9ef1983
s3-rpcclient: allow to set flags in cmd_ntsvcs_get_dev_list().
...
Guenther
2009-04-10 01:06:56 +02:00
Günther Deschner
76da89daaa
s3-svcctl: minor fix for _svcctl_EnumDependentServicesW().
...
Guenther
2009-04-09 16:42:28 +02:00
Günther Deschner
8b9f2abfcb
s3-svcctl: Fix invalid buffer memset in _svcctl_QueryServiceObjectSecurity().
...
Found by torture-test.
Guenther
2009-04-09 15:08:29 +02:00
Günther Deschner
acd7fef984
s3-svcctl: Fix _svcctl_Set/GetServiceObjectSecurity after IDL changes.
...
Guenther
2009-04-09 14:51:21 +02:00
Günther Deschner
d8a6ea8141
s3-svcctl: Fix _svcctl_EnumServicesStatusW (again).
...
The final plan is to use the same macro based code that we have in spoolss to
handle the buffers and calculate the buffer-sizes.
Guenther
2009-04-08 23:23:17 +02:00
Volker Lendecke
ccd293ba0e
Remove async_req
2009-04-08 23:11:59 +02:00
Volker Lendecke
cf7d26933b
Convert cli_push to tevent_req
...
Metze, please check!
Thanks,
Volker
2009-04-08 23:11:59 +02:00
Volker Lendecke
9c89aee5f3
Convert cli_pull to tevent_req
2009-04-08 23:11:59 +02:00
Günther Deschner
d0c307af56
s3-net: Fix Bug #5329 : add "net rpc service delete/create".
...
Patch from Danny Tylman <danny.tylman@insightix.com>.
Guenther
2009-04-08 22:40:24 +02:00
Volker Lendecke
a3f24d91c5
Convert rpc_transport_smbd_init to tevent_req
2009-04-08 22:17:04 +02:00
Volker Lendecke
8a2112c942
Convert rpc_cli_smbd_conn_init to tevent_req
2009-04-08 22:17:04 +02:00
Volker Lendecke
bfacecc17b
Convert get_anon_ipc to tevent_req
2009-04-08 22:17:04 +02:00
Volker Lendecke
f3d33cd81d
Convert rpc_transport_np_init to tevent_req
2009-04-08 22:17:03 +02:00
Günther Deschner
47bda3f3c7
s3-eventlog: split out evlog_convert_tdb_to_evt().
...
Guenther
2009-04-08 19:45:58 +02:00
Günther Deschner
98d703a6b7
s3-eventlog: move rpc_server/srv_eventlog_lib.c out of rpc_server.
...
Guenther
2009-04-08 19:45:57 +02:00
Günther Deschner
5654f141a2
s3-rpc-server: remove unused rpc_server/srv_util.c file.
...
Guenther
2009-04-08 14:41:28 +02:00
Günther Deschner
c1b354531f
s3-selftest: As Samba3 now passes RPC-SPOOLSS-WIN enable it against ourself.
...
Guenther
2009-04-08 13:52:11 +02:00
Günther Deschner
fa7f2ffe51
s3-selftest: add root for make test as well (not only make selftest).
...
Guenther
2009-04-08 13:11:16 +02:00
Günther Deschner
78951bd7f4
s3-util-sock: add ismyaddr() check in is_myname_or_ipaddr().
...
Guenther
2009-04-08 12:47:10 +02:00
Günther Deschner
403422e1ea
s3-selftest: Samba3 passes RPC-SVCCTL so enable it during make test.
...
Guenther
2009-04-08 11:49:24 +02:00
Günther Deschner
8e3145e551
svcctl: use offered/needed for buffer sizes as in spoolss.
...
Guenther
2009-04-08 11:03:53 +02:00
Günther Deschner
b36fab0491
s3-svcctl: no need to define SVCCTL_NUM_INTERNAL_SERVICES twice in a file.
...
Guenther
2009-04-08 01:52:28 +02:00
Andrew Bartlett
6859b805e8
s3:lib Use push_ucs2_talloc() in ms_fnmatch()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-08 01:15:24 +02:00
Günther Deschner
c5b24d65cd
s3-spoolss: set servername to global_myname() in set_printer_hnd_name().
...
This allows spoolss_OpenPrinterEx to open a printer by printername.
Now the Samba3 spoolss server passes the RPC-SPOOLSS-WIN test.
Guenther
2009-04-07 22:15:15 +02:00
Andrew Bartlett
0c22d55134
s3:charcnv Remove unused unistrcpy() and unistrlen()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 20:51:56 +02:00
Andrew Bartlett
3277b19800
s3:rpc_parse remove unused prs_unistr2()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 20:51:55 +02:00
Andrew Bartlett
80163b5ac5
s3:charcnv Remove unused unistr2 functions
...
Natrually, the hard work to make these unsued was done by GD, not me :-)
Andrew Bartlett
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 20:51:55 +02:00
Andrew Bartlett
5fff538820
s3:charcnv Remove unused ucs2_to_unistr2()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 20:51:55 +02:00
Karolin Seeger
4458809597
s3/loadparm: Fiy typos.
...
Karolin
2009-04-07 20:05:21 +02:00
Karolin Seeger
a103222e0b
s3/gpo_ldap: Fix typo.
...
Karolin
2009-04-07 20:05:21 +02:00
Karolin Seeger
6343cab308
s3/smbconf_reg: Fix typo.
...
Karolin
2009-04-07 20:05:21 +02:00
Tim Prouty
161bd7f78f
s3 onefs: Fix case-insensitivity for mangled names
...
onefs_get_real_filename needs to demangle the filename before doing
the case-insensitive estat
2009-04-07 10:44:50 -07:00
Tim Prouty
785c19182b
s3 oplocks: Add back procid_str to debug message
2009-04-07 10:14:59 -07:00
Andrew Bartlett
042aaffabf
s3:smbldap convert the easy cases to push_utf8_talloc()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 18:55:05 +02:00
Andrew Bartlett
574a6a8c35
s3:kerberos Rework smb_krb5_unparse_name() to take a talloc context
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 13:25:36 +02:00
Andrew Bartlett
fca02c9154
s3:smbtorture Convert charcnv torture suite to use push_ucs2_talloc()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 12:54:59 +02:00
Günther Deschner
d71dec9259
s3-libads: avoid NULL talloc context with ads_get_dn().
...
Guenther
2009-04-07 01:17:30 +02:00
Günther Deschner
21b083a647
s3-svcctl: Fix _svcctl_EnumServicesStatusW() crash bug on too small buffer.
...
Guenther
2009-04-07 01:16:30 +02:00
Tim Prouty
9d2d07503a
s3 onefs: Simplify level 2 oplock self-contention
...
This removes all oplock dependence on locking.tdb
2009-04-06 13:53:45 -07:00
Tim Prouty
651fa0964a
s3 oplocks: Refactor level II oplock contention
2009-04-06 13:53:45 -07:00
Günther Deschner
12d9765177
s3-samr: add support for _samr_Connect3() while planning to pass a s4 smbtorture test.
...
Guenther
2009-04-06 22:37:11 +02:00
Volker Lendecke
1c4027678e
Correct sync wrappers in cli_pipe.c
2009-04-06 21:32:08 +02:00
Volker Lendecke
3084d49cc0
Add a bad hack to enable level 2 oplocks in torture_open_connection_share
2009-04-06 21:32:08 +02:00
Volker Lendecke
0c353b5711
Make cli_oplock_ack async
2009-04-06 21:32:08 +02:00
Volker Lendecke
64ce0e4645
Add async oplock waiter
2009-04-06 21:32:08 +02:00
Volker Lendecke
cb120b4df6
Never hand out 0xffff as a mid
...
This is used for oplock replies
2009-04-06 21:32:07 +02:00
Volker Lendecke
64067f9204
Remove async_req based async libsmb infrastructure
2009-04-06 21:32:07 +02:00
Volker Lendecke
86b09e84ae
Re-add the CHAIN1 test
2009-04-06 21:32:07 +02:00
Volker Lendecke
025eb40fbc
Convert cli_open to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
31910810cf
Convert cli_close to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
ad695b2525
Streamline cli_push sync wrapper
2009-04-06 21:32:07 +02:00
Volker Lendecke
097db28c5d
Convert cli_write_andx to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
17b8d05b62
Streamline cli_pull sync wrapper
2009-04-06 21:32:07 +02:00
Volker Lendecke
c23ccff13a
Convert cli_read_andx to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
ca7cd350a6
Convert cli_ntcreate to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
807328ce6d
Convert cli_tcon_andx to tevent_req
2009-04-06 21:32:07 +02:00
Volker Lendecke
03becb5066
Convert cli_negprot to tevent_req
2009-04-06 21:32:06 +02:00
Volker Lendecke
95c792b6af
Convert cli_session_setup_guest to tevent_req
2009-04-06 21:32:06 +02:00
Volker Lendecke
7ef78bd7b5
Convert cli_trans to tevent_req
2009-04-06 21:32:06 +02:00
Volker Lendecke
dec928e884
Convert cli_echo to tevent_req
2009-04-06 21:32:06 +02:00
Volker Lendecke
0a4cdad324
Remove the CHAIN1 test -- will come back later
2009-04-06 21:32:06 +02:00
Volker Lendecke
8bdac3615a
Add new async libsmb infrastructure
...
I know this is just yet another iteration, but I like this one much better than
the one that exists right now :-)
It will do trans and echo requests without a _recv helper and without
unnecessary memcpy().
2009-04-06 21:32:06 +02:00
Volker Lendecke
ad29104d3d
Add read_smb_send/recv, dumping keepalives
2009-04-06 21:32:05 +02:00
Andrew Bartlett
2050187673
s3:libads Make ads_get_dn() take a talloc context
...
Also remove ads_memfree(), which was only ever a wrapper around
SAFE_FREE, used only to free the DN from ads_get_ds().
This actually makes libgpo more consistant, as it mixed a talloc and a
malloc based string on the same element.
Andrew Bartlett
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06 15:54:41 +02:00
Andrew Bartlett
89278b1819
s3:printing Convert nt_printer_publish_ads() to use talloc better
...
In particular, this removes one more user of pull_utf8_allocate()
Andrew Bartlett
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06 14:56:29 +02:00
Andrew Bartlett
9512640155
s3:smbldap Remove smbldap_get_dn
...
This removes one more caller to pull_utf8_allocate()
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06 14:52:51 +02:00
Volker Lendecke
a2d5fe4a05
Make some functions static to vfs_gpfs.c
2009-04-06 13:29:59 +02:00
Volker Lendecke
f2e17a4b24
Add prototype for smbd_gpfs_get_realfilename_path
2009-04-06 13:29:59 +02:00
Volker Lendecke
54c2fe6583
Fix two c++ warnings in vfs_gpfs.c
2009-04-06 13:29:59 +02:00
Volker Lendecke
15f6d5e805
Use the server config file for smbpasswd -a user in make test
...
Without this, smbpasswd generated a SID for the netbios name TORTURE_6. This SID
somehow ended up in the user's token for quite a number of tests, leading to
NT_STATUS_ACCESS_DENIED. I haven't fully understood what is going on here, but
with this patch I could not reproduce the ACCESS_DENIED anymore. It might be
coincidence and this patch does not fix anything, but for me it does not really
hurt either.
Metze, please check!
Volker
2009-04-05 17:31:40 +02:00
Volker Lendecke
e5c7df34f2
Remove a silly check
...
This does not increase security, and if later error messages suck, we have to
fix those.
2009-04-05 17:04:28 +02:00
Volker Lendecke
ba408a2c82
Remove async_req dependency from cli_pull_trans
2009-04-05 16:07:41 +02:00
Volker Lendecke
3b0572bf91
Fix smbd crash for close_on_completion
...
handle_trans() can talloc_free "conn" if the client requests
close_on_completion. "state" is a talloc_child of conn, so it will be gone when
we later free state->data et al.
2009-04-05 14:34:14 +02:00
Volker Lendecke
0421fa90ce
Keep the forked-smbd stdout reader around longer
2009-04-05 13:52:46 +02:00
Volker Lendecke
6d760a4a9f
Ensure 0-termination for the forked-smbd debug output
2009-04-05 13:52:46 +02:00
Volker Lendecke
ac4c319ed7
Pass the current debuglevel down to the forked smbd
2009-04-05 13:52:46 +02:00
Günther Deschner
df29f49edd
s3-samr: add support for setting password hashes via samr_SetUserInfo level 21.
...
Guenther
2009-04-03 13:14:26 +02:00
Volker Lendecke
7ee4f168d8
Use cluster-aware procid_is_me instead of comparing pid's
2009-04-03 12:19:20 +02:00
Volker Lendecke
b63cd72ae4
Use procid_str in debug messages for better cluster-debuggability
2009-04-03 12:19:20 +02:00
Günther Deschner
621d40332a
s3-build: fix the build after tsocket changes.
...
Metze, please check.
Guenther
2009-04-03 00:30:58 +02:00
Günther Deschner
31ab1d6a64
s3-lsa: use LSA_ROLE definitions in _lsa_QueryInfoPolicy().
...
Guenther
2009-04-02 22:52:52 +02:00
Günther Deschner
168eb23252
s3-lsa: don't SAFE_FREE talloced structs.
...
Guenther
2009-04-02 22:50:44 +02:00
Günther Deschner
37aff885a6
s3-spoolss: implement _spoolss_GetPrinterDriver2 level 101 (Bug #5140 ).
...
Guenther
2009-04-02 12:46:04 +02:00
Jeremy Allison
c57b32c5ab
Allow pdbedit to change a user rid/sid. Based on a fix from Alexander Zagrebin <alexz@visp.ru>.
...
Jeremy.
2009-04-01 20:21:02 -07:00
Jeremy Allison
1258ed8b1c
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
2009-04-01 20:20:44 -07:00
Tim Prouty
87fe4d732d
s3 onefs: Quiet a log message about oplocks being requested on streams
2009-04-01 20:06:18 -07:00
Michael Adam
36c1a52a57
s3:net conf: don't store share names as lower case, but as given.
...
Michael
2009-04-02 00:30:13 +02:00
Jeremy Allison
aef0bdc6a1
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
2009-04-01 14:03:17 -07:00
Günther Deschner
01a942d8ab
s3-auth: rename static smb_create_user(). Sorry...
...
Guenther
2009-04-01 21:44:14 +02:00