samba.git
15 years agos3-rpc_parse: remove unused smb_io_domsid().
Günther Deschner [Wed, 25 Mar 2009 22:09:52 +0000 (23:09 +0100)]
s3-rpc_parse: remove unused smb_io_domsid().

Guenther
(cherry picked from commit c86df62b4a51b2813104aece8b3813b1806aeb22)
(cherry picked from commit 62923f9be593d8c7cdcb79c56b9f2c0c36e5dbdd)

15 years agos3: remove unused rpc_parse/parse_sec.c file.
Günther Deschner [Wed, 25 Mar 2009 21:38:58 +0000 (22:38 +0100)]
s3: remove unused rpc_parse/parse_sec.c file.

Guenther
(cherry picked from commit 72636db8e5f06e887db6c34b6f88bef567c093dd)
(cherry picked from commit 8ab087da9038f7b80b4488727be49092a7e562cf)

15 years agos3-registry: remove last sec_io_desc() caller.
Günther Deschner [Wed, 25 Mar 2009 21:37:21 +0000 (22:37 +0100)]
s3-registry: remove last sec_io_desc() caller.

This is a temporary solution while waiting for the regf merge from s4.

Guenther
(cherry picked from commit 8000479d181347bd6f248309168721fe3a20ad2a)
(cherry picked from commit a0aea317fad27085377da9c3832f88a178579c3c)

15 years agos3-libnet: Fix Bug #6193: avoid messing with sync_context in libnet_samsync_delta().
Günther Deschner [Wed, 25 Mar 2009 14:58:20 +0000 (15:58 +0100)]
s3-libnet: Fix Bug #6193: avoid messing with sync_context in libnet_samsync_delta().

We absolutely need to avoid messing with the sync_context as that breaks the
stream of replication data coming from the DC (only replicates ~350 instead of
~4000 groups).

Guenther
(cherry picked from commit e3f7057b0942793543c215ab45176c4280bd7d51)
(cherry picked from commit 16cba3ec22ca424db0f98185e179c718794bc563)

15 years agos3-spoolss: implement enumprinters_level0.
Günther Deschner [Fri, 20 Mar 2009 15:02:48 +0000 (16:02 +0100)]
s3-spoolss: implement enumprinters_level0.

Guenther
(cherry picked from commit 283e135298767f128c413e0e6df75d21ec8e8e6b)
(cherry picked from commit 54d48c3749981621dd5286ae5c8227f28f5fdc35)

15 years agos3 onefs: Change error status to NT_ACCESS_DENIED for errors in SET_SECURITY_DESC
David Kwan [Fri, 20 Mar 2009 16:03:08 +0000 (16:03 +0000)]
s3 onefs: Change error status to NT_ACCESS_DENIED for errors in SET_SECURITY_DESC
(cherry picked from commit ad98eae02e623a8ca8aa6a1c46d5aedea50e2e4b)
(cherry picked from commit 7d5996e1d5eca454f651ca49a357d28077446309)

15 years agos3: parse_packet can return NULL which is then dereferenced in match_mailslot_name
Tim Prouty [Wed, 25 Mar 2009 00:05:16 +0000 (17:05 -0700)]
s3: parse_packet can return NULL which is then dereferenced in match_mailslot_name
(cherry picked from commit db5677d071fc58f38cab4ab800111455a8637edb)
(cherry picked from commit 0f01296bbb08d75ce693a65ea6cb0df80c1b4927)

15 years agoFix two memleaks in the encryption code
Volker Lendecke [Tue, 24 Mar 2009 20:57:01 +0000 (21:57 +0100)]
Fix two memleaks in the encryption code

ntlmssp_seal_packet creates its own signature data blob, which we then
have to free.

Jeremy, please check and merge appropriately (Yes, I'm asking you to do the
janitor work, I want you to *look* at this :-))

Volker
(cherry picked from commit 17616dddfaa26688387f671c870873056896f6b7)

15 years agoFix bug 6097
Volker Lendecke [Tue, 24 Mar 2009 10:07:16 +0000 (11:07 +0100)]
Fix bug 6097

A client sent a SID with authority 0 and 0 sub-authorities. W2k3 replies with
NT_STATUS_INVALID_SID, even if other SIDs in the list are valid.

Thanks to Pavel <wylda@volny.cz> for the bug report!
(cherry picked from commit e4f3d75432dbe372e164962a993b6e882fe44e83)

15 years agos3: add missing prototype for auth_wbc_init().
Günther Deschner [Tue, 24 Mar 2009 10:02:40 +0000 (11:02 +0100)]
s3: add missing prototype for auth_wbc_init().

Guenther
(cherry picked from commit c388efdbcb9ef1ecd5a81f7731ce56c7f79b2579)
(cherry picked from commit 87cf381dc3bd020dc043419f4ca18a3ff118458d)

15 years agos3:dsgetdcname: use parentheses in if condition to make negation clear
Björn Jacke [Mon, 23 Mar 2009 11:26:03 +0000 (12:26 +0100)]
s3:dsgetdcname: use parentheses in if condition to make negation clear

Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 87b428e424e2e3cca975ecd0efed327e72950a1d)
(cherry picked from commit a2e138419138a2f675f6370426a6caeda0a314b4)

15 years agoUse avahi to register _smb._tcp in smbd
Volker Lendecke [Sun, 22 Mar 2009 14:59:33 +0000 (15:59 +0100)]
Use avahi to register _smb._tcp in smbd
(cherry picked from commit 55b7bf7338c13701944169df02ab8e9def6d43a1)

15 years agoAdd tevent avahi binding
Volker Lendecke [Fri, 20 Mar 2009 13:55:05 +0000 (14:55 +0100)]
Add tevent avahi binding
(cherry picked from commit 49fc1138b5e4dcf66b84a14ba47cc1da40c764f2)

15 years agoAdd avahi detection to configure
Volker Lendecke [Fri, 20 Mar 2009 13:53:10 +0000 (14:53 +0100)]
Add avahi detection to configure
(cherry picked from commit b943e0083f6b0daa226f395158fcf7f467cdacd0)

15 years agoDisable dns_sd by default
Volker Lendecke [Fri, 20 Mar 2009 13:39:19 +0000 (14:39 +0100)]
Disable dns_sd by default
(cherry picked from commit 8cf21c9c7121049329f4d3e86d3021cdd2dec86a)

15 years agoѕ3/winbind_pam: fix gcc 4.4 compile warning
Björn Jacke [Mon, 23 Mar 2009 12:02:57 +0000 (13:02 +0100)]
ѕ3/winbind_pam: fix gcc 4.4 compile warning
(cherry picked from commit f4aec7b5907065a2f48d1b19065c6673aff6a190)
(cherry picked from commit 11b3f0d8deb629489de4de29cedf518adc86d196)

15 years agoFix connect to port 139 only -- thanks gd for bugging me :-)
Volker Lendecke [Mon, 23 Mar 2009 11:05:02 +0000 (12:05 +0100)]
Fix connect to port 139 only -- thanks gd for bugging me :-)
(cherry picked from commit 298bff5019be5a40dc0023b5af1e980fba91abd9)
(cherry picked from commit c96d0ffd944f536a1228812c761ba4fb4313ee05)

15 years agotalloc_array_length: talloc_get_size deals fine with NULL
Volker Lendecke [Sun, 22 Mar 2009 21:07:58 +0000 (22:07 +0100)]
talloc_array_length: talloc_get_size deals fine with NULL
(cherry picked from commit 89cb10430c30c9e59a5305210b7f09346b360c42)

15 years agoOnly build the dirsort module if we have the dirfd function
Volker Lendecke [Sun, 22 Mar 2009 12:14:15 +0000 (13:14 +0100)]
Only build the dirsort module if we have the dirfd function

Fix the build on HP/UX
(cherry picked from commit 4a4c69d26526294aa6e9b98d34d8495fc3fc65e8)

15 years agoDocument the dirsort module
Volker Lendecke [Sun, 22 Mar 2009 10:39:32 +0000 (11:39 +0100)]
Document the dirsort module
(cherry picked from commit 211a04568aa97d8c327a02eb28c80b952446d5df)

15 years agoUse StrCaseCmp in the dirsort module
Volker Lendecke [Sun, 22 Mar 2009 10:39:10 +0000 (11:39 +0100)]
Use StrCaseCmp in the dirsort module
(cherry picked from commit fcd02076d7562d2bc222dd15d2cd0a8fff58d5cf)

15 years agoAdd dirsort module
Andy Kelk [Sun, 22 Mar 2009 10:06:52 +0000 (11:06 +0100)]
Add dirsort module
(cherry picked from commit 2364bc8dcd46ca66e06e1dd8d4ed224611d65330)

15 years agos3-spoolss: _spoolss_EnumPrinters level 3 always returns WERR_UNKNOWN_LEVEL.
Günther Deschner [Fri, 20 Mar 2009 15:03:54 +0000 (16:03 +0100)]
s3-spoolss: _spoolss_EnumPrinters level 3 always returns WERR_UNKNOWN_LEVEL.

Guenther
(cherry picked from commit 19de802c171f70ec4de102452afac52e2c0e548f)
(cherry picked from commit 8630f2cbdfaaf8260615f16ba360b1281b666df5)

15 years agos3-spoolss: implement enumprinters_level4.
Günther Deschner [Fri, 20 Mar 2009 14:53:17 +0000 (15:53 +0100)]
s3-spoolss: implement enumprinters_level4.

Guenther
(cherry picked from commit d2de9b068c19a8eaac64f9cf4ea4aae153cffcd4)
(cherry picked from commit 53965d391c08cc3b935f5bd86d2d95bb6fe89262)

15 years agos3-spoolss: implement enumprinters_level5.
Günther Deschner [Fri, 20 Mar 2009 14:49:57 +0000 (15:49 +0100)]
s3-spoolss: implement enumprinters_level5.

Guenther
(cherry picked from commit aa6dbcfc11b74c1e80728bc295d9612ba4eb1e64)
(cherry picked from commit 48df86ca7f6d59b530597621862a619813a0568f)

15 years agos3-spoolss: use enum_all_printers_info_level for level 1 and 2.
Günther Deschner [Fri, 20 Mar 2009 14:48:10 +0000 (15:48 +0100)]
s3-spoolss: use enum_all_printers_info_level for level 1 and 2.

Guenther
(cherry picked from commit 6713244d465b0cf69f1bba15744e05795ec2fda9)
(cherry picked from commit ebf6d6d956a60c4f95baa4e148573bde933bdb2d)

15 years agos3-spoolss: add enum_all_printers_info_level().
Günther Deschner [Fri, 20 Mar 2009 14:44:31 +0000 (15:44 +0100)]
s3-spoolss: add enum_all_printers_info_level().

Guenther
(cherry picked from commit 95f2913c7de2ac69421911ec2cb0fcbb8c4e8e93)
(cherry picked from commit ce1b736da021858273a1daff0246e0740bc67620)

15 years agos3-spoolss: apply some const in spoolss server.
Günther Deschner [Fri, 20 Mar 2009 14:14:09 +0000 (15:14 +0100)]
s3-spoolss: apply some const in spoolss server.

Guenther
(cherry picked from commit 5a388115a944a425a774d7ec98260b7595998ee1)
(cherry picked from commit e0cdb435d38c643d5a75aa16e793c6f09a349978)

15 years agos3-rpcclient: allow to set flags in enumprinters command.
Günther Deschner [Fri, 20 Mar 2009 13:47:13 +0000 (14:47 +0100)]
s3-rpcclient: allow to set flags in enumprinters command.

Guenther
(cherry picked from commit c9a388348a2d4b276448b6a7bfc8c575b99f8eb7)
(cherry picked from commit f9eb007d64e155d561cd257d3d6e09b267299a0b)

15 years agos3-netapi: Fix Coverity #774 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:21:36 +0000 (11:21 +0100)]
s3-netapi: Fix Coverity #774 (REVERSE_INULL).

Guenther
(cherry picked from commit 3a6133d70202ef80ead4203740c000be5e93b288)
(cherry picked from commit 0ec1350d3d9272a6070950ba1d460523f53a628d)

15 years agos3-netapi: Fix Coverity #775 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:19:59 +0000 (11:19 +0100)]
s3-netapi: Fix Coverity #775 (REVERSE_INULL).

Guenther
(cherry picked from commit f2243e8197aa064adea3da2a4d1c08250668943f)
(cherry picked from commit 8a6f09cededf4167aea5f08e573bab51afcc0074)

15 years agos3-netapi: Fix Coverity #776 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:17:50 +0000 (11:17 +0100)]
s3-netapi: Fix Coverity #776 (REVERSE_INULL).

Guenther
(cherry picked from commit d2e348b191ada5492538b7bdae1bb7cd3f639aba)
(cherry picked from commit e858d192e1d7d6ab45ec247fbb776f5825e7fca5)

15 years agos3-krb5: Fix Coverity #762 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:11:04 +0000 (11:11 +0100)]
s3-krb5: Fix Coverity #762 (REVERSE_INULL).

Guenther
(cherry picked from commit 97190ae184dff6450b1390c854f7426e2ee3f980)
(cherry picked from commit 1a591aadb66d589171d236fc2f8bf2eb6d9ce499)

15 years agos3-net: Fix Coverity #861 (UNINIT).
Günther Deschner [Fri, 20 Mar 2009 10:07:21 +0000 (11:07 +0100)]
s3-net: Fix Coverity #861 (UNINIT).

Guenther
(cherry picked from commit 73030b107d5722a2c42cd18240d45bcb256335ac)
(cherry picked from commit 81a6aee736f805d1bf8d7d2a1ff19851cd11d763)

15 years agos3-net: Fix Coverity #898 (UNINIT).
Günther Deschner [Fri, 20 Mar 2009 10:04:59 +0000 (11:04 +0100)]
s3-net: Fix Coverity #898 (UNINIT).

Guenther
(cherry picked from commit d2fb6d348248cdca7e55360c77aa31b91250f885)
(cherry picked from commit 874caf9a1fb45f36ec8c506d29264735d1647dae)

15 years agos3-spoolss: pure comsetics.
Günther Deschner [Thu, 19 Mar 2009 11:53:01 +0000 (12:53 +0100)]
s3-spoolss: pure comsetics.

sorry, I just need to do that.

Guenther
(cherry picked from commit 045151b767c62ac1343e86cb3886107226e73fda)
(cherry picked from commit 59811de7a80d5ecdf090c116087c7a03ae288887)

15 years agos3-krb5: Fix Coverity #722 (RESOURCE_LEAK).
Günther Deschner [Thu, 19 Mar 2009 15:42:54 +0000 (16:42 +0100)]
s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).

Guenther
(cherry picked from commit 1524abd8bf12d82e1fb0063585fc9a465fc7bf9c)
(cherry picked from commit 42a692da477d7986767ad90a15087aa8a2ebcb40)

15 years agos3-net: Fix Coverity #886 (FORWARD_NULL).
Günther Deschner [Thu, 19 Mar 2009 15:18:29 +0000 (16:18 +0100)]
s3-net: Fix Coverity #886 (FORWARD_NULL).

Guenther
(cherry picked from commit 2c186be0df33664eea980c17720be41f25f91288)
(cherry picked from commit 990917cbe3f8cd00e2d13dd67ee752fffae94401)

15 years agos3-samr: try to to fix password_expired flag handling.
Günther Deschner [Thu, 27 Nov 2008 16:49:25 +0000 (17:49 +0100)]
s3-samr: try to to fix password_expired flag handling.

Guenther
(cherry picked from commit 842edcd2b08763a35dbdea3518fcc039aa70aad4)
(cherry picked from commit 98dd60a0e85d37945deaa997d87f5cb173eaaea9)

15 years agoFix crash in async_smb.c
Bo Yang [Wed, 4 Mar 2009 10:10:20 +0000 (18:10 +0800)]
Fix crash in async_smb.c
(cherry picked from commit b20cace3a7c312f44f39390954bc087b888d9b27)

15 years agoadd a versiontest program to print samba_version_string().
Michael Adam [Thu, 19 Mar 2009 22:56:12 +0000 (23:56 +0100)]
add a versiontest program to print samba_version_string().

This is to allow for testing samba_version_string() without
the need to compile any of the larger binaries like smbd or net...

Michael
(cherry picked from commit a75c184cafbb80adb0a3b056e55608d2d263a0c6)

15 years agoversion: fix handling of SAMBA_VERSION_VENDOR_PATCH.
Michael Adam [Thu, 19 Mar 2009 22:55:21 +0000 (23:55 +0100)]
version: fix handling of SAMBA_VERSION_VENDOR_PATCH.

We need a string version of this, or else version.c does not compile.

Michael
(cherry picked from commit 21bf5cac5f352f51432ad717b2e5051a3a63cac9)

15 years agos3: Fix a free of an uninitialized variable in winbind_get_sid_aliases
Dan Sledz [Thu, 19 Mar 2009 21:53:34 +0000 (21:53 +0000)]
s3: Fix a free of an uninitialized variable in winbind_get_sid_aliases
(cherry picked from commit c50490e4af2f4270cf8b59f868b45630efb55efd)

15 years agofix build on old Heimdal based systems
Björn Jacke [Mon, 16 Mar 2009 00:51:09 +0000 (01:51 +0100)]
fix build on old Heimdal based systems

Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 011ad7245d53a716c4c766f5ef8d317bb3a53d0f)
(cherry picked from commit 3b74ba990e5b96e17ef76845551ab03fdddc59f8)

15 years agos3:libsmb: always create bytes array in cli_trans code
Stefan Metzmacher [Wed, 18 Mar 2009 07:46:38 +0000 (08:46 +0100)]
s3:libsmb: always create bytes array in cli_trans code

Otherwise we return NO_MEMORY without a reason for fragmented trans
requests, as talloc_append_blob() returns buf if we append a 0 length
blob. When we pass buf = NULL we'll get back NULL and then assume
NO_MEMORY...

metze
(cherry picked from commit 88dd6af605dc5754b7e146a068272d37651da710)
(cherry picked from commit 5bbf96dd63227a19fe1f95ff8d8f2b3c75a5a497)

15 years agos3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests
Stefan Metzmacher [Wed, 18 Mar 2009 06:56:51 +0000 (07:56 +0100)]
s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests

Before we send the secondary requests we need to remove the
old mid=>seqnum mapping and reset cli->mid and make the new
mid=>seqnum mapping "persistent".

The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli->mid
and the secondary requests used the incremented mid,
but as cli->outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.

cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().

The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.

metze
(cherry picked from commit 880fbc4e8cd67de73c4bcda94489eb1e1422a04b)
(cherry picked from commit 70466990b4b7c68ae95dbbcf741cd3f41f2dd0b3)

15 years agos3:lib/util_sock: use sys_recv() instead of sys_read() on sockets
Stefan Metzmacher [Thu, 19 Mar 2009 08:06:38 +0000 (09:06 +0100)]
s3:lib/util_sock: use sys_recv() instead of sys_read() on sockets

This ways the pcap support in socket wrapper sees the received data.

metze
(cherry picked from commit 0dfdb7b911ed4fe013fc4a22a8c3a28620277a67)
(cherry picked from commit 6ec3d902e16edd6d911b6883f565ddf1938b47bf)

15 years agofix some typos
Björn Jacke [Wed, 18 Mar 2009 18:05:52 +0000 (19:05 +0100)]
fix some typos

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 4ce43918e6e942c4e50d30283e5a542f5f8465ad)

15 years agoModify simple POSIX open test to use filenames containing a ':'
Jeremy Allison [Thu, 19 Mar 2009 04:48:20 +0000 (21:48 -0700)]
Modify simple POSIX open test to use filenames containing a ':'
character. Should stop regressions of bug #6196.
Jeremy.
(cherry picked from commit 69093de0a3ae958c214542bb4f374ed90ff1c82d)

15 years agoAllow DFS client paths to work when POSIX pathnames have been
Jeremy Allison [Thu, 19 Mar 2009 03:56:48 +0000 (20:56 -0700)]
Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this).
Jeremy.
(cherry picked from commit 913d1f2af87fa449881a6fd2774a9dfdcb198fb4)

15 years agoFix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
Jeremy Allison [Thu, 19 Mar 2009 03:00:28 +0000 (20:00 -0700)]
Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.
(cherry picked from commit 8d8c25a34241c1b4a1d40d7ad02bd1e1baa605be)

15 years agos3 onefs: Correctly error out when the read returns EOF
Tim Prouty [Wed, 18 Mar 2009 21:49:50 +0000 (21:49 +0000)]
s3 onefs: Correctly error out when the read returns EOF

Also add some more debugging.
(cherry picked from commit a398deb3fe71a6c4c237b1f64dd7bbb8cb6bfa28)

15 years agoFix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly.
Jeremy Allison [Wed, 18 Mar 2009 22:43:36 +0000 (15:43 -0700)]
Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly.
This is a really nasty one to fix as in order to successfully update the
passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
values before we do the upgrade.
Jeremy.
(cherry picked from commit 8e1c29a8be7ea21a6998b77e872bcef90160ee83)

15 years agos3: remove POLICY_HND.
Günther Deschner [Wed, 18 Mar 2009 21:49:41 +0000 (22:49 +0100)]
s3: remove POLICY_HND.

Guenther
(cherry picked from commit 531af136f9dd5c6050f78948837294aed02de440)
(cherry picked from commit 91216ffa95b4ed53e54b11665e96b911cb4e4ab5)

15 years agos3-rpc_parse: remove some unused parsing code.
Günther Deschner [Wed, 18 Mar 2009 14:09:57 +0000 (15:09 +0100)]
s3-rpc_parse: remove some unused parsing code.

Guenther
(cherry picked from commit 7d7b1a8dcc338ea037cc02ef1b2dd9e9f6ce0943)
(cherry picked from commit 032113b3fe5a8fa06672256cbc028833b519b83f)

15 years agos3-spoolss: fix _spoolss_GetPrinterData printerserver handle query error code.
Günther Deschner [Wed, 18 Mar 2009 20:54:26 +0000 (21:54 +0100)]
s3-spoolss: fix _spoolss_GetPrinterData printerserver handle query error code.

When _spoolss_GetPrinterData receives a query on a printserver handle for a
value that we have not stored or do not provide, we need to return
WERR_INVALID_PARAM, not WERR_BADFILE. Tested with w2k and w2k3 servers.
Found by torture test.

Guenther
(cherry picked from commit a1256594b047061d5fce8b7b4234dc725462392d)
(cherry picked from commit 4a62b839c64ce309245a6167388f78e63918c5c4)

15 years agos3-spoolss: fix _spoolss_EnumPrinterDataEx error path.
Günther Deschner [Wed, 18 Mar 2009 20:36:40 +0000 (21:36 +0100)]
s3-spoolss: fix _spoolss_EnumPrinterDataEx error path.

When a windows clients queries the "" key, we need to make sure to return with
the appropriate error (WERR_INVALID_PARAM in that case), and not fall through
to the buffer size handling macros. Found by torture test.

Guenther
(cherry picked from commit 43182fdff89bc5c238e7a90cf93500cef850ecd5)
(cherry picked from commit 095eb03b14a7ddf4194dcafb618100c768369f1d)

15 years agos3-rpc_parse: remove unused BUFFER5 and UNISTR3.
Günther Deschner [Wed, 18 Mar 2009 11:22:22 +0000 (12:22 +0100)]
s3-rpc_parse: remove unused BUFFER5 and UNISTR3.

Guenther
(cherry picked from commit 7a85a87edf3a589235b932a3c802278e78da4ec5)
(cherry picked from commit 5bc2518950cce45dcbdccf17439c11a3d959f97d)

15 years agos3-rpc_client: remove unused CLI_DO_RPC_WERR macro.
Günther Deschner [Wed, 18 Mar 2009 17:10:01 +0000 (18:10 +0100)]
s3-rpc_client: remove unused CLI_DO_RPC_WERR macro.

Guenther
(cherry picked from commit e966719049702827c482c5e19783b9a7c725bdb1)
(cherry picked from commit e1055c372a3b77fdd28f17635465a7a0a9c578fa)

15 years agos3-smbcontrol: use correct PRINTER_NOTIFY flags.
Günther Deschner [Wed, 18 Mar 2009 16:45:30 +0000 (17:45 +0100)]
s3-smbcontrol: use correct PRINTER_NOTIFY flags.

Guenther
(cherry picked from commit 21391f7fbe6c92ba050462750571cda661f5fb8a)
(cherry picked from commit 6ac0a8d45e14deede30f56ab8c4d8288b83f15b4)

15 years agospoolss: add my copyright.
Günther Deschner [Wed, 25 Feb 2009 13:33:59 +0000 (14:33 +0100)]
spoolss: add my copyright.

Guenther
(cherry picked from commit 9d1ab9a0013127d08bad01975a5204e8f63b9ddc)
(cherry picked from commit ecc7537b6b0c7921160448b97a3cd8df1f4c77cf)

15 years agos3-spoolss: remove include/rpc_spoolss.h.
Günther Deschner [Wed, 18 Mar 2009 15:38:36 +0000 (16:38 +0100)]
s3-spoolss: remove include/rpc_spoolss.h.

Guenther
(cherry picked from commit 7fbdf8aae93f143c879de705936279f42eb8ee6f)
(cherry picked from commit 2471cb64f7d2d2e7eb594b1cf904af9d6befd389)

15 years agos3-spoolss: remove rpc_server/srv_spoolss.c alltogether.
Günther Deschner [Tue, 17 Mar 2009 23:45:35 +0000 (00:45 +0100)]
s3-spoolss: remove rpc_server/srv_spoolss.c alltogether.

Guenther
(cherry picked from commit 36d07858069ed8710a0ad822535074bed77ec130)
(cherry picked from commit 931e48a757d40fb4dd5099560fe31afad201464c)

15 years agos3-spoolss: remove rpc_parse/parse_spoolss.c alltogether.
Günther Deschner [Tue, 17 Mar 2009 23:43:31 +0000 (00:43 +0100)]
s3-spoolss: remove rpc_parse/parse_spoolss.c alltogether.

Good-Bye, last hand-marshalled rpc functions, rest in peace.

Guenther
(cherry picked from commit a502392541bcb45babbb8ca57e17306aa726ee9b)
(cherry picked from commit 82e78e67e00863437ef26914ff8d85007509b620)

15 years agos3-spoolss: remove old spoolss_EnumPrinterDataEx.
Günther Deschner [Tue, 17 Mar 2009 23:41:47 +0000 (00:41 +0100)]
s3-spoolss: remove old spoolss_EnumPrinterDataEx.

Guenther
(cherry picked from commit a4e999c7e3214de26bdc7a20d5ec25d4ffdf152d)
(cherry picked from commit 92a9ede4ffc82a66531e716535db34416b387340)

15 years agos3-spoolss: use pidl for _spoolss_EnumPrinterDataEx.
Günther Deschner [Tue, 17 Mar 2009 23:38:40 +0000 (00:38 +0100)]
s3-spoolss: use pidl for _spoolss_EnumPrinterDataEx.

Please note that this has been the last call in samba3 that was
using hand-marshalled rpc. With this commit all named pipe rpc services
in samba3 have now fully moved to pidl generated code :-)

Guenther
(cherry picked from commit 0cfb1aea29929c0605d299d71784787aa516bc2a)
(cherry picked from commit 0a20f7df770f2d460ff4034baf3ad29a96be4dd3)

15 years agos3-spoolss: use printer and job notify enums provided by idl.
Günther Deschner [Wed, 18 Mar 2009 15:37:33 +0000 (16:37 +0100)]
s3-spoolss: use printer and job notify enums provided by idl.

Guenther
(cherry picked from commit 31106cdace883de16d5810386d69fc3da7d37c61)
(cherry picked from commit 5b1035546673343f922679a1280b5203c1c1abc4)

15 years agos3-spoolss: fix spoolss server after spoolss_Field changes.
Günther Deschner [Wed, 18 Mar 2009 15:16:25 +0000 (16:16 +0100)]
s3-spoolss: fix spoolss server after spoolss_Field changes.

Guenther
(cherry picked from commit e61c9ca36d48167ea14d7d7cc41ac43a803d3aca)
(cherry picked from commit a5fc8ef7e61442c14f0f39bb86ae57a50ddedc95)

15 years agos3-rpcclient: fix spoolss notify test after spoolss_Field changes.
Günther Deschner [Wed, 18 Mar 2009 15:10:52 +0000 (16:10 +0100)]
s3-rpcclient: fix spoolss notify test after spoolss_Field changes.

Guenther
(cherry picked from commit 8b730ca1d8431d8d1eddee9523c64e60e06bc59c)
(cherry picked from commit 0a876be5de06d0ca627bfdfe8769c08c5876f436)

15 years agos4-smbtorture: fix spoolss notify test after spoolss_Field changes.
Günther Deschner [Wed, 18 Mar 2009 15:10:11 +0000 (16:10 +0100)]
s4-smbtorture: fix spoolss notify test after spoolss_Field changes.

Guenther
(cherry picked from commit 9744a7058c1f4805c9ca12080fd8ccffe3a038b8)
(cherry picked from commit d63021ec7bc1b0dcfa500c258116bca268f71079)

15 years agospoolss: add custom ndr_print_spoolss_Field.
Günther Deschner [Wed, 18 Mar 2009 15:06:40 +0000 (16:06 +0100)]
spoolss: add custom ndr_print_spoolss_Field.

Guenther
(cherry picked from commit 65151077b31e8cc4a8bfedd8fb4a186804d36b9a)
(cherry picked from commit 9fb3b11b9846ec259f9fffd629db59567db10f18)

15 years agos3: re-run make samba3-idl.
Günther Deschner [Wed, 18 Mar 2009 14:48:48 +0000 (15:48 +0100)]
s3: re-run make samba3-idl.

Guenther
(cherry picked from commit 0e21ea39d51583d9395628255dc34c173629a724)
(cherry picked from commit c39be71ac70155c19098737d6dce42772b5bf9c6)

15 years agospoolss: make spoolss_Field a nodiscriminant union of 2 sets of notify flag enums.
Günther Deschner [Wed, 18 Mar 2009 14:48:06 +0000 (15:48 +0100)]
spoolss: make spoolss_Field a nodiscriminant union of 2 sets of notify flag enums.

Guenther
(cherry picked from commit f9ddc6ae4ac750dd349f8103d045eb23bc4416a0)
(cherry picked from commit 5c2b396dde289a6f37bb9cb40ae1ef6ec784818e)

15 years agos3:winbindd: accept new connections via fd events
Stefan Metzmacher [Mon, 16 Mar 2009 16:27:30 +0000 (17:27 +0100)]
s3:winbindd: accept new connections via fd events

metze
(cherry picked from commit 93c2057c8b5a3976cda65a9d27dc4dbb9c5c550a)
(cherry picked from commit 00b65cc6ebcb4c67259e7fa618f6d961f7117396)

15 years agos3:winbindd: move non event related code out of process_loop() in the the caller
Stefan Metzmacher [Mon, 16 Mar 2009 15:14:20 +0000 (16:14 +0100)]
s3:winbindd: move non event related code out of process_loop() in the the caller

metze
(cherry picked from commit 3b8dd79f2bc775ed94130565ec2c4383a4864348)
(cherry picked from commit ca31920af281ba9ea8f466ed0264118737a1b055)

15 years agos3:winbindd: remove unused close_winbindd_socket() function
Stefan Metzmacher [Mon, 16 Mar 2009 15:06:12 +0000 (16:06 +0100)]
s3:winbindd: remove unused close_winbindd_socket() function

metze
(cherry picked from commit 0685031ccfc09feb0ad070df1c1a1d0cef5874f2)
(cherry picked from commit e270b4f0f62699469cbaad024c893fe84142a256)

15 years agos3:smbd: use tevent_loop_once() in the parent event loop
Stefan Metzmacher [Mon, 16 Mar 2009 14:55:39 +0000 (15:55 +0100)]
s3:smbd: use tevent_loop_once() in the parent event loop

metze
(cherry picked from commit 450252d2a1981fb04eb62eb095c1b762a96f7727)
(cherry picked from commit 3ccc0bd5ea15da6b4daa53d9dcfb6a283330493d)

15 years agos3:printing: use tevent_loop_wait() instead of manual looping
Stefan Metzmacher [Mon, 16 Mar 2009 14:47:57 +0000 (15:47 +0100)]
s3:printing: use tevent_loop_wait() instead of manual looping

metze
(cherry picked from commit b659daf81f31678f7447545d015bd9d1db8811b9)
(cherry picked from commit c43ef1f1eeb9176cda0d69b5f17c2b4885a0772b)

15 years agos3:printing: use a fd event to monitor the pipe to the parent
Stefan Metzmacher [Mon, 16 Mar 2009 13:56:11 +0000 (14:56 +0100)]
s3:printing: use a fd event to monitor the pipe to the parent

metze
(cherry picked from commit 339ea0503d5ce3bf85cf61528956345c73c668c6)
(cherry picked from commit c9eac30fbbd4af6d73b803b19f0dec8ce72baf59)

15 years agos3:smbd: don't exit the parent when we have no connections
Stefan Metzmacher [Mon, 16 Mar 2009 13:48:40 +0000 (14:48 +0100)]
s3:smbd: don't exit the parent when we have no connections

This code path can't really happen anymore, because
launchd support was removed with commit e5a951325a6cac8567af3a66de6d2df577508ae4.
But it's confusing to have that code there...

metze
(cherry picked from commit 445b37f4f35ff4256c46dbacc2d3b3a1e47e62b2)
(cherry picked from commit a527e24b80abf5aeaafdd67db21b5b021d1effe0)

15 years agos4:build: require tevent 0.9.5
Stefan Metzmacher [Tue, 17 Mar 2009 19:18:31 +0000 (20:18 +0100)]
s4:build: require tevent 0.9.5

metze
(cherry picked from commit e95d0b548e344dbc8cb3dd0a0f29854711bd0cac)
(cherry picked from commit a6a4acddbcfcb36d581c1c7d15ddb8405c0b2bb2)

15 years agotevent: change version to 0.9.5 after the ABI has changed
Stefan Metzmacher [Tue, 17 Mar 2009 19:18:01 +0000 (20:18 +0100)]
tevent: change version to 0.9.5 after the ABI has changed

metze
(cherry picked from commit 7d07266ca26f7069269601043b713a91f1a4693c)
(cherry picked from commit c0a0f504e1477648542aae27b8a58d4db4867d84)

15 years agotevent: store the location where a request was finished
Stefan Metzmacher [Tue, 17 Mar 2009 19:13:34 +0000 (20:13 +0100)]
tevent: store the location where a request was finished

This is very useful to find bugs.
You can use 'p *req' in gdb to show where
tevent_req_done(), tevent_req_error() or tevent_req_nomem()
was called.

metze
(cherry picked from commit 9eaf53d98eced9ea70f411b9936b475c42e4d490)
(cherry picked from commit 8053941b377d3fd2e58e67f68eecb2551be49c10)

15 years agotevent: use an immediate event as trigger for tevent_queue
Stefan Metzmacher [Tue, 17 Mar 2009 09:42:55 +0000 (10:42 +0100)]
tevent: use an immediate event as trigger for tevent_queue

metze
(cherry picked from commit 3a831e46204979550dc6ee7652cea6b8296f10c1)
(cherry picked from commit 7fcb16a79681a24ca3b96ec73bc44b43e57c3c8f)

15 years agotevent: use an immediate event fot tevent_req_post()
Stefan Metzmacher [Tue, 17 Mar 2009 09:18:34 +0000 (10:18 +0100)]
tevent: use an immediate event fot tevent_req_post()

Now tevent_req_post() never fails

metze
(cherry picked from commit 4bdf299385220988a4fe16f82aab528283204c7f)
(cherry picked from commit d88a254c5d2fbdda642d469924411d4d6d5f8422)

15 years agotevent: use TALLOC_FREE() in tevent_req.c
Stefan Metzmacher [Tue, 17 Mar 2009 09:17:50 +0000 (10:17 +0100)]
tevent: use TALLOC_FREE() in tevent_req.c

metze
(cherry picked from commit a78cd2a24b818bc7d843a8e56ffaafc9f6578662)
(cherry picked from commit 54af7b9da45dcef881d9fee7c414d363ca6cdab4)

15 years agos3:events: add support for immediate events
Stefan Metzmacher [Mon, 16 Mar 2009 14:06:52 +0000 (15:06 +0100)]
s3:events: add support for immediate events

metze
(cherry picked from commit 6c290586e41b3f5f7748a5b8c782be67cafe6c57)
(cherry picked from commit ba8a0b59d6f486f09d73e0bcac5712584c9580cc)

15 years agotevent: add support for immediate events
Stefan Metzmacher [Fri, 13 Mar 2009 14:47:33 +0000 (15:47 +0100)]
tevent: add support for immediate events

They're like directly triggered timed events,
but you can preallocated them and scheduling them
will not fail.

metze
(cherry picked from commit 66886f8966dff8a980a5b9d2daa3fbb20fe5ca8e)
(cherry picked from commit de7125980d237e9a8aa126f155bbc84c96bad37e)

15 years agos3:events: make use of tevent_common_loop_wait()
Stefan Metzmacher [Mon, 16 Mar 2009 13:45:42 +0000 (14:45 +0100)]
s3:events: make use of tevent_common_loop_wait()

metze
(cherry picked from commit d27be1d5fa3fdcaac07b527ad14b0d10ef27c0bb)
(cherry picked from commit f18ff6728e97580ff980385137e8e7973ae1d785)

15 years agotevent: add tevent_common_loop_wait() helper function and use it
Stefan Metzmacher [Mon, 16 Mar 2009 13:15:07 +0000 (14:15 +0100)]
tevent: add tevent_common_loop_wait() helper function and use it

tevent_loop_wait should do the same for all backends.
It should loop as long as we have pending events.

metze
(cherry picked from commit 940e61846e97ba62153d5b977b0823f196607743)
(cherry picked from commit c742112da583809f47e40f2e4b48713d2e81edda)

15 years agotevent: check signal events first in event_loop_once
Stefan Metzmacher [Mon, 16 Mar 2009 11:45:48 +0000 (12:45 +0100)]
tevent: check signal events first in event_loop_once

We also check for signal events directly before and after
the select/epoll calls.

metze
(cherry picked from commit 0139befb915006d6ec9fec2734057c5c50b3c383)
(cherry picked from commit c0bc27fc57260191e35464b63e114163d291d4da)

15 years agotevent: let tevent_loop_once() just run one fd event
Stefan Metzmacher [Mon, 16 Mar 2009 11:34:23 +0000 (12:34 +0100)]
tevent: let tevent_loop_once() just run one fd event

This makes the logic much simpler for the callers,
and matches the samba3 behavior.

If needed we can add performance tunning for tevent_loop_wait()
later.

metze
(cherry picked from commit 3af7db3dce0e5529114f6969e9905c6d4c65dfe8)
(cherry picked from commit 1eb7ad106499865713c28847f491aae10f37beb7)

15 years agoconfigure: Add common file with minimum versions of external libraries.
Jelmer Vernooij [Sun, 15 Mar 2009 15:35:13 +0000 (16:35 +0100)]
configure: Add common file with minimum versions of external libraries.
(cherry picked from commit 0ea702efaeaadcdcb05e99e838dae1b2dbdd95b9)
(cherry picked from commit 606b55d220c354f11299d633b1387afd4bc47c55)

15 years agoDepend on newer talloc for Samba 4 in the merged build as well.
Jelmer Vernooij [Sun, 15 Mar 2009 13:55:12 +0000 (14:55 +0100)]
Depend on newer talloc for Samba 4 in the merged build as well.
(cherry picked from commit 74299582c4989d00a45962836bb02cc7f4b2dd20)
(cherry picked from commit 646c93ee8f7e6f52b55900923b5db9d7a1571742)

15 years agoRemove unused CONST_DISCARD macro.
Jelmer Vernooij [Sun, 15 Mar 2009 02:05:46 +0000 (03:05 +0100)]
Remove unused CONST_DISCARD macro.
(cherry picked from commit 75783473d180661257e3f0e3d300179caf34bd8e)
(cherry picked from commit 5c75c1406fd6bdd6319070cb4098929c28eeba94)

15 years agos4:build: require tevent 0.9.4
Stefan Metzmacher [Fri, 13 Mar 2009 14:50:23 +0000 (15:50 +0100)]
s4:build: require tevent 0.9.4

metze
(cherry picked from commit 1355dc2fd3a10c54fc3534409b78972d59d59b30)
(cherry picked from commit f136ed96e46c1d4b6aec13daf468ada2fdf59715)

15 years agotevent: change version to 0.9.4 as the ABI has changed
Stefan Metzmacher [Fri, 13 Mar 2009 14:49:35 +0000 (15:49 +0100)]
tevent: change version to 0.9.4 as the ABI has changed

metze
(cherry picked from commit 868f3f5f32eccdf68590cdfc5c42e1af970410d7)
(cherry picked from commit 868cc328b189144c49901692206534c9b2729fbd)

15 years agoFix fallback if system doesn't provide talloc.
Jelmer Vernooij [Sat, 14 Mar 2009 20:06:41 +0000 (21:06 +0100)]
Fix fallback if system doesn't provide talloc.
(cherry picked from commit 0c72c503faa0506ed25067e623f9263da8e2c94c)
(cherry picked from commit 82f9d29c4b6cd5cc1c5901d801a28c2f649d4205)

15 years agoAllow using external libtalloc.
Jelmer Vernooij [Sat, 14 Mar 2009 19:56:26 +0000 (20:56 +0100)]
Allow using external libtalloc.
(cherry picked from commit 61447dfbbfe275e3704ff939480f38629b52064a)
(cherry picked from commit 3106e9fac2316cbbb06261f54aa86a7a2e77e2b4)

15 years agos3-rpc_parse: move prs_uint64 to rpc_parse/parse_prs.c.
Günther Deschner [Wed, 18 Mar 2009 14:05:44 +0000 (15:05 +0100)]
s3-rpc_parse: move prs_uint64 to rpc_parse/parse_prs.c.

Guenther
(cherry picked from commit 9ab8953d74491d7ab4a30c242aa0935efb38f857)
(cherry picked from commit d001b199a1cf73b7c7f4574191698325871527d9)