1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

51368 Commits

Author SHA1 Message Date
Volker Lendecke
e3569df15b If we receive a DOS error code, nt_errstr should display it 2009-02-10 21:55:13 +01:00
Michael Adam
ca23469a90 packaging: add script fill-templates
This is a standalone-wrapper for update-pkginfo, which is
usually called from create-tarball. It basically repeats
some functionality of create-tarball.

Michael
2009-02-10 18:59:33 +01:00
Volker Lendecke
77e3272092 Fix an uninitialized variable. Tim, please check! 2009-02-10 18:29:34 +01:00
Volker Lendecke
bbb665501a Add queueing to np_write 2009-02-10 18:29:34 +01:00
Volker Lendecke
f6e9f1e7ea Add queueing to np_read_state, simulate message-type named pipes.
The problem with msg-type pipes is that we have to return short reads when a
message ends before the read request. When reading from the unix domain socket,
the message limits are lost. So we would happily return more than a message,
which confuses for example the s4 rpc client horribly. I'd expect other np rpc
clients also to blow up over this.

The real solution is to properly implement a two-byte length field per message
on the unix domain socket, but this requires more changes there. And as we
right now only serve DCE/RPC over the named pipes, this implements a hack that
looks into the fragment headers to figure out hdr.frag_len.
2009-02-10 18:29:34 +01:00
Volker Lendecke
47cb572d40 Add read_pkt_send/recv 2009-02-10 18:29:34 +01:00
Stefan Metzmacher
c3baf1529d selftest/Samba4: pass down the kdc address down to provision_raw_*()
metze
2009-02-10 18:07:13 +01:00
Stefan Metzmacher
0d9531e2d3 selftest/Samba4: split out ldap specific stuff from provision_raw_*()
metze
2009-02-10 18:07:12 +01:00
Stefan Metzmacher
cfb9cbdf68 selftest/Samba4: split out share configurations of provision_raw*()
metze
2009-02-10 18:07:12 +01:00
Stefan Metzmacher
da12481df6 selftest/Samba4: split provision() into provision_raw_prepare() and provision_raw_run()
This functions will be reused soon for a Samba34.pm used by
a 'make selftest34'

metze
2009-02-10 18:06:49 +01:00
Stefan Metzmacher
f0e75ff363 selftest: s/SMBD/SAMBA/ in Samba.pm
metze
2009-02-10 11:47:24 +01:00
Stefan Metzmacher
76a2d068f5 selftest: allow "skip" as max runtime for smbd, nmbd and winbindd
metze
2009-02-10 11:47:02 +01:00
Stefan Metzmacher
bb88b03846 selftest: Samba3 protect against removing /*
metze
2009-02-10 11:47:01 +01:00
Stefan Metzmacher
3c1feb82c8 selftest: add target::Template
metze
2009-02-10 11:47:01 +01:00
Stefan Metzmacher
b5e2e72511 merged-build: pass PYTHON and PERL down to make test4
metze
2009-02-10 11:47:00 +01:00
Stefan Metzmacher
4248a8bf99 selftest: add my copyright
metze
2009-02-10 11:47:00 +01:00
Günther Deschner
cab2de7bb0 s3-spoolss: remove old spoolss_OpenPrinter.
Guenther
2009-02-10 11:27:04 +01:00
Günther Deschner
96f05fcd1c s3-spoolss: use pidl for _spoolss_OpenPrinter.
Guenther
2009-02-10 11:26:58 +01:00
Günther Deschner
3d4221a9cb s3-spoolss: remove old spoolss_OpenPrinterEx.
Guenther
2009-02-10 11:26:52 +01:00
Günther Deschner
b4bda6da5a s3-spoolss: use pidl for _spoolss_OpenPrinterEx.
Guenther
2009-02-10 11:26:45 +01:00
Günther Deschner
0fc13e7e2c s3-spoolss: remove old spoolss_SetJob.
Guenther
2009-02-10 11:26:39 +01:00
Günther Deschner
e4b5e67566 s3-spoolss: use pidl for _spoolss_SetJob.
Guenther
2009-02-10 11:26:33 +01:00
Günther Deschner
2ede56f3c0 s3-spoolss: remove old spoolss_StartDocPrinter.
Guenther
2009-02-10 11:26:26 +01:00
Günther Deschner
0a34c140cc s3-spoolss: use pidl for _spoolss_StartDocPrinter.
Guenther
2009-02-10 11:26:19 +01:00
Günther Deschner
46200a7cd4 s3-spoolss: add temporary convert_devicemode_new function.
Guenther
2009-02-10 11:24:47 +01:00
Günther Deschner
ee469585eb s3-spoolss: use SPOOLSS_JOB_CONTROL bits defined in IDL.
Guenther
2009-02-10 11:09:51 +01:00
Günther Deschner
9d05e91ec0 s3-rpcclient: use rpccli_spoolss_openprinter_ex helper.
Guenther
2009-02-10 11:05:02 +01:00
Günther Deschner
b19b6aea12 s3-rpcclient: add rpccli_spoolss_openprinter_ex() convenience wrapper.
Guenther
2009-02-10 11:04:53 +01:00
Günther Deschner
25fc58afcd s3-spoolss: fix memleak in get_remote_printer_publishing_data().
Guenther
2009-02-10 10:54:15 +01:00
Steven Danneman
11f60a62a1 s3: OneFS bulk directory enumeration support
OneFS provides the bulk directory enumeration syscall readdirplus().  This
syscall has the same semantics as the NFSv3 READDIRPLUS command, returning
a batch of directory entries with prefetched stat information via one
syscall.

This commit wraps the readdirplus() call in the existing POSIX
readdir/seekdir VFS interface.  By default a batch of 128 directory entries
are optimistically read from the kernel into a global cache, and fed to
iterative calls of VFS_OP_READDIR.

The global buffers could be avoided in the future by hanging connection
specific buffers off the conn struct.

Added new parameter "onefs:use readdirplus" which toggles usage of this
code on or off.
2009-02-09 23:56:17 -08:00
Steven Danneman
6272f4c2f4 s3: Added SMB_VFS_INIT_SEARCH_OP to initialize data at the beginning of SMB search requests.
By default this VFS call is a NOOP, but the onefs vfs module takes advantage
of it to initialize direntry search caches at the beginning of each
TRANS2_FIND_FIRST, TRANS2_FIND_NEXT, SMBffirst, SMBsearch, and SMBunique
2009-02-09 23:56:17 -08:00
Steven Danneman
25d345eb39 Pass stat buffer down through all levels of VFS_READDIR wrappers
* VFS_OP_READDIR can now provide stat information, take advantage of it
  if it's available
* is_visible_file(): optimistically expect the provided stat buffer is
  already valid
* dptr_ReadDirName(): refactor code for easier readability, functionality
  is the same
2009-02-09 23:56:16 -08:00
Steven Danneman
af0e199b31 Add an optional SMB_STRUCT_SMB parameter to VFS_OP_READDIR
* this allows VFS implementations that prefetch stat information on
  readdir to return it through one VFS call
* backwards compatibility is maintained by passing in NULL
* if the system readdir doesn't return stat info, the stat struct is
  set to invalid
2009-02-09 23:56:16 -08:00
Tim Prouty
9a7491e831 s3 OneFS: Change ACLs to do a stat-only open before get/set_security_descriptor
This ensures that getting/stting a security descriptor does not
contend an oplock.  The correct access checks will be still be done in
the kernel on the get/set rather than the open.
2009-02-09 23:47:46 -08:00
Tim Prouty
16d2c2fa58 s3 OneFS: Add kernel oplocks implementation
A few functions in oplocks_onefs.c need to be accessed from the onefs
vfs module.  It would be ideal if oplocks were implemented at the vfs
layer, but since they aren't yet, a new header is added to
source3/include to make these functions available to the onefs vfs
module.  oplocks_onefs.o doesn't need to be linked into the onefs vfs
module explicitly, since it is already linked into smbd by default.
2009-02-09 23:47:45 -08:00
Tim Prouty
32d68b8ec3 s3 oplocks: Remove oplocks before handling delete on close semantics
Unlinking a file while still holding an oplock can cause problems with
kernel oplocks.  This simply releases the oplock before actually
unlinking the file.
2009-02-09 23:47:45 -08:00
Tim Prouty
17eba16bad s3 oplocks: Add capabilites flags field to the kernel_oplocks struct
Here is a short description for each of the new capability flags:

KOPLOCKS_LEVEL2_SUPPORTED: Level 2 oplocks are supported natively in
the kernel.

KOPLOCKS_DEFERRED_OPEN_NOTIFICATION: The kernel notifies deferred
openers when they can retry the open.

KOPLOCKS_TIMEOUT_NOTIFICATION: The kernel notifies smbds when an
oplock break times out.

KOPLOCKS_OPLOCK_BROKEN_NOTIFICATION: The kernel notifies smbds when an
oplock is broken.
2009-02-09 23:47:45 -08:00
Tim Prouty
c6f1f055fd s3 oplocks: Make the level2 oplock contention API more granular
This replaces release_level2_oplocks_on_change with
contend_level2_oplock_begin/end in order to contend level2 oplocks
throughout an operation rather than just at the begining.  This is
necessary for some kernel oplock implementations, and also lays the
groundwork for better correctness in Samba's standard level2 oplock
handling.  The next step for non-kernel oplocks is to add additional
state to the share mode lock struct that prevents any new opens from
granting oplocks while a contending operation is in progress.

All operations that contend level 2 oplocks are now correctly spanned
except for aio and synchronous writes.  The two write paths both have
non-trivial error paths that need extra care to get right.

RAW-OPLOCK and the rest of 'make test' are still passing with this
change.
2009-02-09 23:47:45 -08:00
Tim Prouty
9c1310fa6a s3 oplocks: Differentiate between releasing an oplock vs. downgrading to Level 2 for kernel oplocks
Pass in an extra argument when releasing an oplock so kernel oplock
implementations can support downgrading from Level 1 to Level 2.
2009-02-09 23:47:44 -08:00
Tim Prouty
122dbbf00a s3 vfs: Add a destructor to the fsp extension data API
I'm not certain if the dummy pointer is needed in struct vfs_fsp_data,
but I added it to be consistent with the comment below.
2009-02-09 23:46:12 -08:00
Andrew Tridgell
fe5b0b595c added a workaround to the handling of unicodePwd for Win7-beta
The Win7-beta domain process has changed. It no longer uses SAMR for
setting the password, and instead uses a ldap modify on a SASL
encrypted ldap connection. We didn't handle that as the unicodePwd
attribute has a dual use, holding the nt style MD4 hases for DRS
replication, but holding a UTF-16 plaintext password for a LDAP
modify.

This patch copes with the ldap unicodePwd modify by recognising the
format and creating the correct attributes on the fly. Note that this
assumes we will never get a unicodePwd attribute set in NT MD4 format
with the first 2 and last 2 bytes set to 0x22 0x00. 

Andrew Bartlett is looking at a more robust solution, possibly using a
flag to say that this modify came via ldap, and not internal ldb
calls.
2009-02-10 17:31:57 +11:00
Andrew Tridgell
72c2da9d32 fixed two problems with the DsRGetDCNameEx2 call, as used by
Win7-beta.

The first problem is that we removed the dnsDomain attribute a while
back, so we were returning NULL for two fields. We now return the
realm.

The second problem is that Win7-beta sends the domain in the form the
user typed it, so it may be in either the short or long form. We check
for the short form and convert if needed.
2009-02-10 17:28:05 +11:00
todd stecher
b4a4d4c9d0 S3: Various fixes for log2pcaphex utility 2009-02-09 18:04:53 -08:00
Tim Prouty
1d65b7a742 s3 spoolss: arch needs to be set before it's passed to get_version_id.
7717ad6880 left arch unitialized.

Guenther, please check.
2009-02-09 16:12:20 -08:00
Michael Adam
ecc53d0312 Revert "s3:winbindd_user: create domain connection in winbindd_fill_pwent if necessary."
This reverts commit 487f5e7b47.

I was confused about the real meaning of find_domain_from_name_noinit()
vs. find_domain_from_name(). We don't need the connection established
here, just the domain struct which gets initialized by rescan_trusted_domains().

Sorry for the noise.

Michael
2009-02-09 23:30:42 +01:00
Jelmer Vernooij
69fff2d750 Revert "Fix errornos assumption that all compilers are gcc"
This breaks (some?) files with gcc.

This reverts commit 98a4327b19.
2009-02-09 23:29:41 +01:00
Günther Deschner
73c603562f s3-spoolss: remove old spoolss_ScheduleJob.
Guenther
2009-02-09 22:49:10 +01:00
Günther Deschner
0d281b76a9 s3-spoolss: use pidl for _spoolss_ScheduleJob.
Guenther
2009-02-09 22:48:14 +01:00
Günther Deschner
43463fcc1e s3-spoolss: remove old spoolss_AddJob.
Guenther
2009-02-09 22:48:07 +01:00
Günther Deschner
cb1ada9cc0 s3-spoolss: use pidl for _spoolss_AddJob.
Guenther
2009-02-09 22:47:57 +01:00