1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

54474 Commits

Author SHA1 Message Date
Stefan Metzmacher
d49a0e5f7d s3:smbd: add support for SMB2 Notify
metze
2009-07-02 09:13:56 +02:00
Stefan Metzmacher
b804c30856 s3:smbd: make change_notify_reply() more generic and hide send_nt_replies() behind a callback
This prepares change notify support for SMB2.

metze
2009-07-02 09:11:01 +02:00
Stefan Metzmacher
ef96e8c958 s3:smbd: simplify the notify code a bit and always reply via change_notify_reply() -> send_nt_replies()
metze
2009-07-02 09:11:00 +02:00
Stefan Metzmacher
8b94eb6cc8 s3:smbd: push nttrans and trans2 responses with no data to the client
For sync replies it's not a problem, as construct_reply() will send
the response, but for async replies we would not send the reply to the client.
Currently the notify code works arround this manually, so I assume
we didn't have a bug here. But the next commits will simplify
the notify code.

metze
2009-07-02 09:10:59 +02:00
Stefan Metzmacher
d73bc83c19 s3:smbd: restore the 3.0.x bahavior of send_nt_replies()
We should also set the error code, when we return no parameters or data.

metze
2009-07-02 09:10:59 +02:00
Stefan Metzmacher
f62a331045 s3:smbd: move global notify_changes_by_mid to smbd_server_connection
metze
2009-07-02 09:10:58 +02:00
Stefan Metzmacher
99c1e4f19a s3:smbd: allow the offset to the path being 0 in SMB2 create
metze
2009-07-02 09:10:57 +02:00
Andrew Tridgell
d47bb0a96c we can't use the unique index code for samAccountName
Using ldb unique indexes for samAccountName doesn't work with DRS as
the other DC may send us a deleted record (tombstone record), which
has the same samAccountName as an existing record. That would then
create two records in the same partition with the same samAccountName.

So we needed to put back the logic in samldb.c which explicitly
checked whether a samAccountName already exists on add
2009-07-02 15:57:30 +10:00
Andrew Tridgell
0aec87454b decrypt all objects in a DRS record, not just the first one
We found this as an object came across from w2k3 with zero values,
which caused a segv when we tried to decrypt the first value
2009-07-02 15:33:01 +10:00
Andrew Tridgell
acfb01a8f6 change talloc to 2.0.0
This is needed to prevent samba3 and samba4 from using an ABI
incompatible system version of talloc

See ongoing discussion on the samba-technical mailing list
2009-07-02 15:19:40 +10:00
Andrew Tridgell
465b879902 Changed ldb.ERR_NO_SUCH_OBJECT to LDB_ERR_NO_SUCH_OBJECT.
The LDB_ERR_NO_SUCH_OBJECT varient is not a defined variable. This
should improve error handling in our python code on some
systems. Unfortunately it still doesn't work on mine. I need to trap
Jelmer somewhere where he can't escape some day and force him to
divulge the deep druid secrets of python exception handling ....
2009-07-02 14:55:38 +10:00
Andrew Tridgell
ae8515d31b fixed the pull of drs schema elements
The previous code incorrectly assumed that attributes such as 
subClassOf come over the wire as strings. In fact they come over as 32
bit integers which refer to goversIDs. We have to post-process these
as it sometimes happens that a governsID comes over the wire before
the record that defines what it means.
2009-07-02 14:55:38 +10:00
Andrew Tridgell
865ca9be64 the settings structure needs to be initialised 2009-07-02 14:55:38 +10:00
Andrew Tridgell
0bdaa8b4ac LDB_ERR_INVALID_DN_SYNTAX doesn't exist ...
The correct name is ldb.ERR_INVALID_DN_SYNTAX
2009-07-02 14:55:38 +10:00
Andrew Bartlett
d7af80fc2e s4:param use talloc_unlink() to free iconv context holding references 2009-07-02 14:34:07 +10:00
Matthias Dieter Wallnöfer
5049f61f39 [SAMBA 4 directory] Changes "forceLogoff" and corrects the "subRefs"
- This changes the attribute "forceLogoff" to its' default
  values according to Windows Server 2003 R2
- Also this corrects the "subRefs" attribute of the base-DN which only refers
  to direct child partitions (and therefore not to the complete transitive closure)
2009-07-02 11:21:02 +10:00
Jeremy Allison
82b5fad8be Ensure we don't use delayed writes on POSIX opened files.
Don't remove pending writetime changes if no time changes
are sent in UNIX_BASIC infolevel.
Jeremy
2009-07-01 17:39:10 -07:00
Jeremy Allison
b971860e01 Fix bug #6520 time stamps - e.g. last mod time is not preserved when "unix extensions=yes" are set - and using latest cifs vfs client
Cancel out any pending "sticky" writes or "last write" changes when
doing a UNIX info level set.
Jeremy.
2009-07-01 16:58:14 -07:00
Stefan Metzmacher
a14efbadd5 s3:util: let parent_dirname() correctly return toplevel filenames
metze
2009-07-01 12:53:41 +02:00
Stefan Metzmacher
b292af0c38 s3:onefs_open: remove unused variable passed to parent_dirname()
metze
2009-07-01 12:53:41 +02:00
Stefan Metzmacher
c229239ea4 s3:smbd: remove unused variables passed to parent_dirname()
metze
2009-07-01 12:53:40 +02:00
Michael Adam
dd118bf219 s3:build: remove the libgpo objects upon "make clean"
Michael
2009-07-01 11:30:35 +02:00
Michael Adam
9d70ef4cac s3:build: remove ../libcli/nbt/tools/nmblookup.o and friends in make clean
Michael
2009-07-01 11:30:35 +02:00
Michael Adam
8d982d91f2 lib/util: fix order of includes in tevent_ntstatus.c
replace.h needs to be included first.

Michael
2009-07-01 11:14:54 +02:00
Andrew Tridgell
34d6d7cec8 fixed the talloc testsuite for the recent changes 2009-07-01 16:37:33 +10:00
Andrew Tridgell
3c2f4df555 a talloc_realloc() to zero size needs to use an unambiguous free 2009-07-01 16:37:33 +10:00
Matt Kraai
4fb1f8e8fe s3/docs: Fix typo.
This fixes bug #6519.
2009-07-01 08:18:11 +02:00
Andrew Tridgell
826ee307fc removed a generated file 2009-07-01 15:15:38 +10:00
Andrew Tridgell
27620c85e7 use a talloc_reparent in a very ugly way
this works around some terrible use of talloc in the libnet code
2009-07-01 15:15:37 +10:00
Andrew Tridgell
0534ae012b use the new talloc_reparent in two places 2009-07-01 15:15:37 +10:00
Andrew Tridgell
5fe1d8dc12 changes to remove the ambiguity in talloc_free() and talloc_steal()
These changes follow from the discussions on samba-technical. The
changes are in several parts, and stem from the inherent ambiguity
that was in talloc_free() and talloc_steal() when the pointer that is
being changes has more than one parent, via references.

The changes are:

 1) when you call talloc_free() on a pointer with more than one parent
 the free will fail, and talloc will log an error to stderr like this:

    ERROR: talloc_free with references at some/foo.c:123
	   reference at other/bar.c:201
	   reference at other/foobar.c:641
 
 2) Similarly, when you call talloc_steal() on a pointer with more
 than one parent, the steal will fail and talloc will log an error to
 stderr like this:

    ERROR: talloc_steal with references at some/foo.c:123
	   reference at other/bar.c:201

 3) A new function talloc_reparent() has been added to change a parent
 in a controlled fashion. You need to supply both the old parent and
 the new parent. It handles the case whether either the old parent was
 a normal parent or a reference

The use of stderr in the logging is ugly (and potentially dangerous),
and will be removed in a future patch. We'll need to add a debug
registration function to talloc.
2009-07-01 15:15:37 +10:00
Andrew Tridgell
6a192020a2 gensec_start now steals the auth_context 2009-07-01 15:15:37 +10:00
Andrew Tridgell
386211a81c A rather strange varient of talloc_unlink
A dcerpc request may have a reference from a still completing async
callback, but we now consider the request to be complete. We want to
lose the main parent, leaving just the reference, if any.
2009-07-01 15:15:37 +10:00
Andrew Tridgell
08ed6a2281 another case that should use py_talloc_reference 2009-07-01 15:15:37 +10:00
Andrew Tridgell
269b16212a use py_talloc_reference instead of py_talloc_import
This is one of the few cases where we want the object to be owned by
both the python object and C code
2009-07-01 15:15:37 +10:00
Andrew Tridgell
1251032921 py_talloc_import now uses a steal, so this free is incorrect 2009-07-01 15:15:37 +10:00
Andrew Tridgell
956b5a0003 fixed use of reference in pytalloc
The previous code caused memory leaks, and also caused situations
where talloc_free could be called on pointers with multiple parents

The new approach is to have two functions:

  py_talloc_import : steals the pointer, so it becomes wholly owned by
                     the python object
  py_talloc_reference: uses a reference, so it is owned by both python
                     and C
2009-07-01 15:15:37 +10:00
Andrew Tridgell
2d981919b8 use a talloc_unlink() as ops may have a reference 2009-07-01 15:15:37 +10:00
Andrew Tridgell
45ba09457e fixed the reference to the global_schema 2009-07-01 15:15:36 +10:00
Andrew Tridgell
f7a6206b55 removed a redundent talloc_steal 2009-07-01 15:15:36 +10:00
Andrew Tridgell
b2c3c08b46 fixed the use of talloc_steal in ntlmssp_server
The previous use of talloc_steal could cause a steal of a pointer that
had references. This ensures that doesn't happen
2009-07-01 15:15:36 +10:00
Andrew Tridgell
9faa0745e9 fixed rpc smb code to not reply on talloc_free being a function pointer
The upcoming talloc_free/talloc_reference changes change talloc_free
to be a macro. These two bits of code relied on it being a function
pointer
2009-07-01 15:15:36 +10:00
Matthias Dieter Wallnöfer
b31f1e6d5b [SAMBA 4 directory] Corrects the "systemFlags" attributes
Set the values like Windows Server 2003 R2.
2009-07-01 14:50:42 +10:00
Matthias Dieter Wallnöfer
d4a969530d [SAMBA 4 directory] Adds the complete "objectclass path" to our self-created DC object
Found after some comparisons against Windows Server 2003 R2.
2009-07-01 14:50:42 +10:00
Matthias Dieter Wallnöfer
3e3c08c7a6 [SAMBA 4 directory] Adds the object version and "systemFlags" attribute to the display specifiers
The object version showed up in the Windows 2003 Server R2 AD.
The "systemFlags" attribute has been set to the right value.
2009-07-01 14:50:42 +10:00
Tim Prouty
969106a21f s3 docs: Add documentation for 'kerberos method' and 'dedicated keytab file' parameters 2009-06-30 18:14:38 -07:00
SATOH Fumiyasu
7f7ebfaecb Fix bug #6496 - MS-DFS: cannot follow multibyte char link name.
consumed_ucs is the number of bytes
of the UCS2 path consumed not counting any
terminating null. We need to convert
back to unix charset and count again
to get the number of bytes consumed from
the incoming path.
2009-06-30 15:29:08 -07:00
Günther Deschner
78519b6500 s3-netlogon: remove unneeded fstrings from netlogon server.
Guenther
2009-06-30 22:21:09 +02:00
Jeff Layton
f7250144ed umount.cifs: don't build it by default
Now that the sanity checks for mount.cifs default to matching the
behavior of /bin/mount, then there is virtually no need for umount.cifs.
The only exception is when someone enables the loose setuid behavior in
mount.cifs.

If an unprivileged user mounts a share that isn't in /etc/fstab, then
/bin/mount won't allow that user to unmount it. In that situation,
umount.cifs will be necessary to allow unmounting the share.

Signed-off-by: Jeff Layton <jlayton@samba.org>
Acked-by: Steve French <smfrench@us.ibm.com>
2009-06-30 15:03:13 -04:00
Volker Lendecke
91a8cb851e Fix bug #6431 - local groups from 3.0 setups no longer found.
Search for groups without group suffix, group suffix is only used for new entries.
2009-06-30 11:42:15 -07:00