rusty/samba.git
15 years agos3-rpcclient: use get_domain_handle() fn in enum domain users & groups.
Günther Deschner [Fri, 22 May 2009 14:48:01 +0000 (16:48 +0200)]
s3-rpcclient: use get_domain_handle() fn in enum domain users & groups.

Guenther
(cherry picked from commit 86d087fccc30a82cb1fe3a71d0353634496e72c4)
(cherry picked from commit e172757782d17ba1066d1cefe18e2a8d55b3ce96)

15 years agoAttempt to fix a debian build problem
Volker Lendecke [Mon, 25 May 2009 10:36:30 +0000 (12:36 +0200)]
Attempt to fix a debian build problem
(cherry picked from commit 31eec30c33b300d93f6d6895f6d0e6b06e0c2185)

15 years agoFix a race condition in winbind leading to a panic
Volker Lendecke [Sun, 24 May 2009 16:57:13 +0000 (18:57 +0200)]
Fix a race condition in winbind leading to a panic

In winbind, we do multiple events in one select round. This needs fixing, but
as long as we're still using it, for efficiency reasons we need to do that.

What can happen is the following: We have outgoing data pending for a client,
thus

state->fd_event.flags == EVENT_FD_WRITE

Now a new client comes in, we go through the list of clients to find an idle
one. The detection for idle clients in remove_idle_client does not take the
pending data into account. We close the socket that has pending outgoing data,
the accept(2) one syscall later gives us the same socket.

In new_connection(), we do a setup_async_read, setting up a read fde. The
select from before however had found the socket (that we had already closed!!)
to be writable. In rw_callback we only want to see a readable flag, and we
panic in the SMB_ASSERT(flags == EVENT_FD_READ).

Found using

bin/smbtorture //127.0.0.1/tmp -U% -N 500 -o 2 local-wbclient

Volker
(cherry picked from commit bfeab3a0f621dbea50f43c98ba70b0ccd8323bff)

15 years agoEnsure we return NT_STATUS_FILE_IS_A_DIRECTORY on a posix open on a
Jeremy Allison [Fri, 22 May 2009 22:56:59 +0000 (15:56 -0700)]
Ensure we return NT_STATUS_FILE_IS_A_DIRECTORY on a posix open on a
directory name.
Jeremy.
(cherry picked from commit 689664ad7acf13b07409abd4c2820dbe10255b68)

15 years agoTest that POSIX open of a directory returns NT_STATUS_FILE_IS_A_DIRECTORY (ERRDOS...
Jeremy Allison [Fri, 22 May 2009 22:56:46 +0000 (15:56 -0700)]
Test that POSIX open of a directory returns NT_STATUS_FILE_IS_A_DIRECTORY (ERRDOS, EISDIR).
Jeremy.
(cherry picked from commit 935a1a89c6c027e068f79e3686396c28812f9e67)

15 years agos3:winbind:idmap_ldap: fix a crash bug in idmap_ldap_unixids_to_sids (#6387)
Michael Adam [Fri, 22 May 2009 09:58:00 +0000 (11:58 +0200)]
s3:winbind:idmap_ldap: fix a crash bug in idmap_ldap_unixids_to_sids (#6387)

This fixes a crash bug hit when multiple mappings were found by
the ldap search. This crash was caused by an ldap asssertion
in ldap_next_entry because was set to NULL in each iteration.

The corresponding fix was applied to the idmap_ldap_sids_to_unixids()
by Jerry in 2007 (b066668b74768d9ed547f16bf7b6ba6aea5df20a).

This fixes the crash part of bug #6387.

There is a logic part, too:
The problem currently only occurs when multiple mappings are found
for one given unixid. Now winbindd does not crash any more but
it does not correctly handle this situation. It just returns the
last mapping from the ldap search results.
This needs fixing.

Michael
(cherry picked from commit e9010fa366746ec1ae948dbcf3493d446e23b14c)

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

15 years agoDon't steal when we know the ptr will be null. Thanks to Simo for
Jeremy Allison [Fri, 22 May 2009 01:48:17 +0000 (18:48 -0700)]
Don't steal when we know the ptr will be null. Thanks to Simo for
pointing this out.
Jeremy.
(cherry picked from commit b6769282d60d20301f085243b3e747efffe2d637)

15 years agoRevert the last two commits (fix for #6386). The actual problem
Jeremy Allison [Fri, 22 May 2009 01:37:36 +0000 (18:37 -0700)]
Revert the last two commits (fix for #6386). The actual problem
was a bug in ldb in 3.2 which could return a freed pointer on
ret != LDAP_SUCCESS. The main thing we must ensure is that we
never talloc_steal until we know LDAP_SUCCESS was returned.
Jeremy.
(cherry picked from commit f3c3ee0f5dc6266f58e96606b73f55b812fe5171)

15 years agoEnsure all possible uses of indirection through res are checked after
Jeremy Allison [Fri, 22 May 2009 01:00:54 +0000 (18:00 -0700)]
Ensure all possible uses of indirection through res are checked after
an ldb_search.
Jeremy.
(cherry picked from commit 64f6bd6c9b24e985fcd56765190046d3e9a5344e)

15 years agoAttempt to fix bug #6386 - Samba Panic triggered by Sophos Control Centre.
Jeremy Allison [Fri, 22 May 2009 00:27:25 +0000 (17:27 -0700)]
Attempt to fix bug #6386 - Samba Panic triggered by Sophos Control Centre.
Don't indirect a potentially null pointer.
Jeremy.
(cherry picked from commit b4f6bb84d1bcd5a09d7c20c2a7dac0bfb11f199f)

15 years agoDetect tight loop in tdb_find()
Jim McDonough [Thu, 21 May 2009 20:26:26 +0000 (16:26 -0400)]
Detect tight loop in tdb_find()
(cherry picked from commit dbd5dd808f14b1df0ed3dabd0553baddad2d186b)

15 years agoAdd a security model to LSA. Similar to the SAMR code - using
Jeremy Allison [Wed, 20 May 2009 18:52:11 +0000 (11:52 -0700)]
Add a security model to LSA. Similar to the SAMR code - using
the MS-LSA docs.
Jeremy.
(cherry picked from commit c57de2c23d4208d4d7d06decdb1663670faa228d)

15 years agoUse SMB_VFS_NEXT_CLOSE. This VFS stuff is really opaque to me...
Volker Lendecke [Mon, 18 May 2009 04:18:57 +0000 (06:18 +0200)]
Use SMB_VFS_NEXT_CLOSE. This VFS stuff is really opaque to me...

Thanks Michael to provide some transparency :-)
(cherry picked from commit db9f5e1d7bb5a2ee3a42428dd1406f27c09d671f)

15 years agoFix bug disclosed by lock8 torture test
Volker Lendecke [Mon, 18 May 2009 04:02:07 +0000 (06:02 +0200)]
Fix bug disclosed by lock8 torture test

We have to drop the gpfs level share modes, regardless of whether we put
the file into the pending close queue.
(cherry picked from commit 0eaf040f469972d1dfd2b53d8df97bb135e3e4d4)

15 years agos3-selftest: add add and delete group scripts using nss_wrapper.
Günther Deschner [Wed, 20 May 2009 00:12:17 +0000 (02:12 +0200)]
s3-selftest: add add and delete group scripts using nss_wrapper.

Guenther
(cherry picked from commit e11f9b46c6345471cca76b9772080d3bfd687852)
(cherry picked from commit f6b0448f814e47ea9eccf895c5182565104acae7)

15 years agonsswrapper: implement group_del() in nss_wrapper.pl.
Günther Deschner [Wed, 20 May 2009 00:10:12 +0000 (02:10 +0200)]
nsswrapper: implement group_del() in nss_wrapper.pl.

Guenther
(cherry picked from commit 3bd360c73de77559593e11301d247fd53c4ce128)
(cherry picked from commit 28ed6d144647c4f0181e9a2650cabba91eb56f3e)

15 years agonsswrapper: implement group_add() in nss_wrapper.pl.
Günther Deschner [Wed, 20 May 2009 00:06:22 +0000 (02:06 +0200)]
nsswrapper: implement group_add() in nss_wrapper.pl.

Guenther
(cherry picked from commit b3cc01fd68e30ebd616897982e0d8befd2a2a7e0)
(cherry picked from commit e8c9731d5ffa1503dd695e2ab89450973c8a7acb)

15 years agoAdded mapping table for account object in lsa.
Jeremy Allison [Tue, 19 May 2009 21:47:25 +0000 (14:47 -0700)]
Added mapping table for account object in lsa.
Jeremy.
(cherry picked from commit 1a219740537319c4369a10572c46949de566ce49)

15 years agos3 onefs: Removing an incorrect TALLOC_FREE
Aravind Srinivasan [Thu, 14 May 2009 15:54:46 +0000 (15:54 +0000)]
s3 onefs: Removing an incorrect TALLOC_FREE

Signed-off-by: Tim Prouty <tprouty@samba.org>
(cherry picked from commit bb454b5fd95185a1456ea120b3a7c56f4a4f1c78)
(cherry picked from commit d3bb598e656c22955dcb2f34dabcdc4946b61725)

15 years agos3: Always allocate memory in dptr_ReadDirName
Aravind Srinivasan [Mon, 11 May 2009 22:39:05 +0000 (22:39 +0000)]
s3: Always allocate memory in dptr_ReadDirName

This is a follow up to 69d61453df6019caef4e7960fa78c6a3c51f3d2a to
adjust the API to allow the lower layers allocate memory.  Now the
memory can explicitly be freed rather than relying on talloc_tos().

Signed-off-by: Tim Prouty <tprouty@samba.org>
(cherry picked from commit bfe7383d7f0349fec796d04772d42d566f7f083b)

15 years agos4 torture: Fix typo
Tim Prouty [Tue, 19 May 2009 01:31:46 +0000 (18:31 -0700)]
s4 torture: Fix typo
(cherry picked from commit 52d26c3a3a8914a608d8b318e01fee636cc83042)

15 years agos3 sendfile: Fix two bugs in sendfile
Tim Prouty [Tue, 19 May 2009 01:20:18 +0000 (18:20 -0700)]
s3 sendfile: Fix two bugs in sendfile

These were found interally via code inspection.

1) fake_sendfile was incorrectly writing zeros over real data on a
   short read.

2) sendfile_short_send was doing 4 byte writes instead of 1024 byte
   writes due to an incorrect sizeof usage.

Jermey, Vl please check
(cherry picked from commit 7cd8dfc7bdbc6e0715bbd8eddf1ef11c622a8f72)

15 years agos4-smbtorture: Fix build warning in RPC-SAMR tests.
Günther Deschner [Tue, 19 May 2009 00:01:27 +0000 (02:01 +0200)]
s4-smbtorture: Fix build warning in RPC-SAMR tests.

Guenther
(cherry picked from commit 518666102367ce21782cb0f597c136ac125cef05)
(cherry picked from commit e14d0a1b3b4875db08d967131efb4e300d22bc12)

15 years agos3: re-run make samba3-idl.
Günther Deschner [Tue, 19 May 2009 00:00:34 +0000 (02:00 +0200)]
s3: re-run make samba3-idl.

Guenther
(cherry picked from commit d7142fb1b56073ca0d078d0214f70c2c77186fce)
(cherry picked from commit 3f9e43e026d904798998a3d94e7f2e9318fd4d85)

15 years agolsa: add access_masks for accounts, secrets and trusted domains to IDL.
Günther Deschner [Mon, 18 May 2009 23:59:55 +0000 (01:59 +0200)]
lsa: add access_masks for accounts, secrets and trusted domains to IDL.

Guenther
(cherry picked from commit 7c22eed419fe877c51c6c4d1fecea0e2e4aa0b1b)
(cherry picked from commit 3821bd0dec854e4ded4f01f58a13a65068be5643)

15 years agoChange access_check_samr_object -> access_check_object.
Jeremy Allison [Mon, 18 May 2009 22:50:47 +0000 (15:50 -0700)]
Change access_check_samr_object -> access_check_object.
Make map_max_allowed_access global. Change lsa_get_generic_sd
to add Everyone:LSA_POLICY_READ|LSA_POLICY_EXECUTE, not just
LSA_POLICY_EXECUTE.
Jeremy.
(cherry picked from commit 86e10fee0284bc1b9e68c0fc9720b80df3580517)

15 years agos3-lsa: let _lsa_OpenPolicy() just call _lsa_OpenPolicy2().
Günther Deschner [Mon, 18 May 2009 22:16:26 +0000 (00:16 +0200)]
s3-lsa: let _lsa_OpenPolicy() just call _lsa_OpenPolicy2().

Guenther
(cherry picked from commit d06051cc51ded9649d4c201afdf338c2426e6f5f)
(cherry picked from commit 966faaf60758cfc112a5779e357d434b4d045f9c)

15 years agos3-selftest: enable RPC-SAMR-USERS-PRIVILEGES.
Günther Deschner [Mon, 18 May 2009 19:14:42 +0000 (21:14 +0200)]
s3-selftest: enable RPC-SAMR-USERS-PRIVILEGES.

Guenther
(cherry picked from commit 9e741b34b29eebfa3c0ca664a48e806007d572da)
(cherry picked from commit 34da4e42cf077b4a8e4788156b7d7a980e1eefc7)

15 years agos3-lsa: let _lsa_GetSystemAccessAccount() call into _lsa_EnumPrivsAccount().
Günther Deschner [Mon, 18 May 2009 19:05:08 +0000 (21:05 +0200)]
s3-lsa: let _lsa_GetSystemAccessAccount() call into _lsa_EnumPrivsAccount().

Inspired by lsa server from Samba 4.

Just removing a user in SAMR does not remove a user in LSA. If you use
usermanager from windows, the "User Rights" management gui gets unaccessable as
soon as you delete a user that had privileges granted. With this fix, that
no longer existing user would properly appear as an unknown account in the GUI
(as it does while using usermanager with windows domains).

This almost makes Samba3 pass the RPC-SAMR-USERS-PRIVILEGES test.

Guenther
(cherry picked from commit 6ab0c83570b2e60e0cd3bd5f5bfb1923fd359994)
(cherry picked from commit 7303efac8438c17290d66ef48ba6321e57b7bdf9)

15 years agos3-lsa: start a very basic implementation of _lsa_DeleteObject().
Günther Deschner [Mon, 18 May 2009 19:00:29 +0000 (21:00 +0200)]
s3-lsa: start a very basic implementation of _lsa_DeleteObject().

Certainly not the full story but this gets us closer to pass the
RPC-SAMR-USERS-PRIVILEGES test.

Guenther
(cherry picked from commit 4724fef8979c3f0e66cb8e41936af270901093b4)
(cherry picked from commit 0792ff10d5d7379bd5da81a05c642db1e66c6f4b)

15 years agos4-smbtorture: add RPC-SAMR-USERS-PRIVILEGES test.
Günther Deschner [Mon, 18 May 2009 17:37:13 +0000 (19:37 +0200)]
s4-smbtorture: add RPC-SAMR-USERS-PRIVILEGES test.

This test demonstrates the independence of the lsa and samr accounts while
remove a samr users that still has privileges granted.

Guenther
(cherry picked from commit 0a9049be872a0eaf56c1449f8b362b6d91dd781b)
(cherry picked from commit 53324b397ed17a08eb093c8f98e8d645da68aac5)

15 years agos3-privileges: add privilege_delete_account().
Günther Deschner [Fri, 15 May 2009 23:22:28 +0000 (01:22 +0200)]
s3-privileges: add privilege_delete_account().

Guenther
(cherry picked from commit dccecdf33850ec4d763b8b0e7ba7be7a8eb873de)
(cherry picked from commit e3be289df092f3b16bdd06904cd543920e3da307)

15 years agos3-privileges: remove trailing whitespace from privileges codes.
Günther Deschner [Fri, 15 May 2009 23:21:08 +0000 (01:21 +0200)]
s3-privileges: remove trailing whitespace from privileges codes.

Guenther
(cherry picked from commit 118f343b05ba86a1f8fd28394433aa6e961e2d6c)
(cherry picked from commit 0f6e4c62c97e983a99ff2c917b0c7f2db3ca289b)

15 years agoFix SAMR server for winbindd access. Ensure we allow
Jeremy Allison [Mon, 18 May 2009 21:26:37 +0000 (14:26 -0700)]
Fix SAMR server for winbindd access. Ensure we allow
MAX_ACCESS to be mapped to what we're giving Everyone.
Jeremy.
(cherry picked from commit cb49ceb25d8be05148e3081a73f8db10915963f0)

15 years agos3-samr: Fix samr access checks in _samr_SetUserInfo().
Guenther Deschner [Sat, 16 May 2009 01:11:30 +0000 (18:11 -0700)]
s3-samr: Fix samr access checks in _samr_SetUserInfo().

Guenther
(cherry picked from commit c79ceb3345c56cff28b5e828188611c5fc80b1a7)

15 years agos3-samr: Fix samr access checks in _samr_QueryUserInfo().
Guenther Deschner [Sat, 16 May 2009 01:03:34 +0000 (18:03 -0700)]
s3-samr: Fix samr access checks in _samr_QueryUserInfo().

Guenther
(cherry picked from commit 5c3c7f6921c9cff58cf4f85c0b691566bf4cd02e)

15 years agoEnsure users with SeAddUser privs get full access to
Jeremy Allison [Sat, 16 May 2009 00:55:41 +0000 (17:55 -0700)]
Ensure users with SeAddUser privs get full access to
groups/aliases when opening.
Jeremy.
(cherry picked from commit 72f90581a78443efd6cf24bac635fe9032df18fd)

15 years agoAdd extra abilities for a user with SeAddUsers, so they
Jeremy Allison [Sat, 16 May 2009 00:54:27 +0000 (17:54 -0700)]
Add extra abilities for a user with SeAddUsers, so they
can manipulate groups and aliases.
Jeremy.
(cherry picked from commit 361caafeebb37f6247f7ede38a50a70323fdd107)

15 years agoDeleteUser doesn't need the priv checks, this is done at OpenUser time.
Jeremy Allison [Sat, 16 May 2009 00:52:40 +0000 (17:52 -0700)]
DeleteUser doesn't need the priv checks, this is done at OpenUser time.
Jeremy.
(cherry picked from commit c0ff7e5459bdf1351f6cb69e58a1f8105bcfd3dc)

15 years agos3-samr: Fix samr access checks in _samr_RemoveMemberFromForeignDomain().
Guenther Deschner [Sat, 16 May 2009 00:50:49 +0000 (17:50 -0700)]
s3-samr: Fix samr access checks in _samr_RemoveMemberFromForeignDomain().

Guenther
(cherry picked from commit 6d0981845ec005a48a82280e2ebfe85ac9b72537)

15 years agos3-samr: Fix samr access checks in _samr_SetDomainInfo().
Guenther Deschner [Sat, 16 May 2009 00:49:02 +0000 (17:49 -0700)]
s3-samr: Fix samr access checks in _samr_SetDomainInfo().

Guenther
(cherry picked from commit c7e6db566ad2bd5ea6473753a720a9ccc9772b59)

15 years agos3-samr: Fix samr access checks in _samr_QueryDomainInfo().
Guenther Deschner [Sat, 16 May 2009 00:47:16 +0000 (17:47 -0700)]
s3-samr: Fix samr access checks in _samr_QueryDomainInfo().

Guenther
(cherry picked from commit 42ad75c9d31f6101103870e1055a7cd4b7f149fd)

15 years agoFix the core of the SAMR access functions. This passes make test, but
Jeremy Allison [Sat, 16 May 2009 00:43:41 +0000 (17:43 -0700)]
Fix the core of the SAMR access functions. This passes make test, but
usrmgr fails against it. The core of this patch is to move all the
access mask setup into the _samr_OpenXXX functions, and then have
each specific function check the attached access_mask against the
required bits. We can then go through the MS-SAMR doc and match
things up. Signed off by Guenther, and writespace cleanup removal
by Volker.
Jeremy.
(cherry picked from commit bdc797135151d4f85e6368d016bfb26389c6f055)

15 years agos3-netdomjoin-gui: allow to switch between workgroups/domains with the same name.
Günther Deschner [Fri, 15 May 2009 17:43:19 +0000 (19:43 +0200)]
s3-netdomjoin-gui: allow to switch between workgroups/domains with the same name.

Guenther
(cherry picked from commit d800ee50335ecbd2dbd3b451a18a00780ac28f04)
(cherry picked from commit 9db1fc45786872d938939bd33b3b867ee599c9a2)

15 years agos3-netdomjoin-gui: cosmetic fix for empty hostnames.
Günther Deschner [Fri, 15 May 2009 17:42:05 +0000 (19:42 +0200)]
s3-netdomjoin-gui: cosmetic fix for empty hostnames.

Guenther
(cherry picked from commit 8c74d31962eb82f7dcc07000aeb27a84a633a225)
(cherry picked from commit c03287c2f8d03363a26b0518b6370ddfaa7b5915)

15 years agos3-netdomjoin-gui: only gray out labels when not root and not connecting to
Günther Deschner [Fri, 15 May 2009 15:06:54 +0000 (17:06 +0200)]
s3-netdomjoin-gui: only gray out labels when not root and not connecting to
remote machines.

Guenther
(cherry picked from commit 473bf41d20b25bd7d98ea6647e6295b3fb6f34e1)
(cherry picked from commit 7115126d0f7d97c3633b62e76e2fdc681dedb36d)

15 years agoFix bug 5681: Do not limit the number of network interfaces
Volker Lendecke [Mon, 18 May 2009 08:32:27 +0000 (10:32 +0200)]
Fix bug 5681: Do not limit the number of network interfaces

Jeremy as far as I can see there is no real technical reason to limit the
number of interfaces. If you like this patch, can you please merge it to 3.4?
If you don't please tell me :-)

Thanks,

Volker
(cherry picked from commit 71e835942522992c08267da74d480ad6552c6508)

15 years agoMove down the become_root()/unbecome_root() calls into the VFS modules
Volker Lendecke [Mon, 18 May 2009 11:30:16 +0000 (13:30 +0200)]
Move down the become_root()/unbecome_root() calls into the VFS modules

The aio_fork module does not need this, as it does not communicate via signals
but with pipes. Watching a strace log with those become_root() calls in aio.c
is absolutely awful, and it does affect performance.
(cherry picked from commit b8d12d3ffce304b4086488d999f85d80667e196e)

15 years agoIn aio_fork, we have to close all fd's, we might hold a gpfs share mode
Volker Lendecke [Mon, 18 May 2009 07:49:23 +0000 (09:49 +0200)]
In aio_fork, we have to close all fd's, we might hold a gpfs share mode

Keeping such an fd open prohibits another open of that same file.
(cherry picked from commit f22343874833397afb2010a43ee0057fa5d8471e)

15 years agoAdd "file_walk_table" to do stuff with all open files
Volker Lendecke [Mon, 18 May 2009 07:46:05 +0000 (09:46 +0200)]
Add "file_walk_table" to do stuff with all open files
(cherry picked from commit 413a76cef78de56087574a875a1c478603d5d090)

15 years agoFix a race condition in vfs_aio_fork with gpfs share modes
Volker Lendecke [Mon, 18 May 2009 07:36:16 +0000 (09:36 +0200)]
Fix a race condition in vfs_aio_fork with gpfs share modes
(cherry picked from commit f64959ee16214b224225d5b43dfb822ecd772d99)

15 years agos3:fix bug #6371, unsuccessful net conf setparm leaves empty share
Michael Adam [Sun, 17 May 2009 20:15:02 +0000 (22:15 +0200)]
s3:fix bug #6371, unsuccessful net conf setparm leaves empty share

Wrap creation of share and setting of parameter into a transaction.

Michael
(cherry picked from commit 2722dd357cedcd3fad1e3739a4a64f924d53eccb)
(cherry picked from commit 7d791d813e9ca9cb1733d312dc040737b67f4bf4)

15 years agoOops. Forgot to delete now unused local from the previous patch.
Jeremy Allison [Fri, 15 May 2009 23:16:47 +0000 (16:16 -0700)]
Oops. Forgot to delete now unused local from the previous patch.
Jeremy.
(cherry picked from commit 85719213666c1a863f95a9762c1b9c5feea3c440)

15 years agoFix bug #6359 - smbclient -L does not list workgroup for hosts with both IPv4 and...
Ole Hansen [Fri, 15 May 2009 23:13:59 +0000 (16:13 -0700)]
Fix bug #6359 - smbclient -L does not list workgroup for hosts with both IPv4 and IPv6 addresses
(cherry picked from commit fb0f49ce0d10a8c84730156f3f04fe48ee65e8e7)

15 years agos3:build: fix linking with --disable-shared-libs
Michael Adam [Fri, 15 May 2009 21:35:55 +0000 (23:35 +0200)]
s3:build: fix linking with --disable-shared-libs

Michael
(cherry picked from commit f5c96e54c633717ffe1a967f4ab9fdede31fa749)
(cherry picked from commit 74f805fbb654b58372b0c86f3314abfd9c76dbbe)

15 years agoFix bug 6361: Make --rcfile work in smbget
Volker Lendecke [Fri, 15 May 2009 19:02:08 +0000 (21:02 +0200)]
Fix bug 6361: Make --rcfile work in smbget

Thanks to j scott <gl@arlut.utexas.edu> for reporting!
(cherry picked from commit 65e81e93122014a528a096cea9158cf2aceb0bbb)

15 years agos3:swat: hide "config backend" from swat
Michael Adam [Fri, 15 May 2009 16:00:59 +0000 (18:00 +0200)]
s3:swat: hide "config backend" from swat

Michael
(cherry picked from commit c085c8311dfadcb05594714149632e9523a27c14)
(cherry picked from commit ab107e8bb85131d5a7430b7fe58904b488240279)

15 years agos3:param: prevent includes from being dumped in dump_*() functions.
Michael Adam [Thu, 14 May 2009 23:46:09 +0000 (01:46 +0200)]
s3:param: prevent includes from being dumped in dump_*() functions.

This fixes bug #4271: testparm should not print includes.

Michael
(cherry picked from commit 00297b74ac6320a23ba444647718680ddee37453)
(cherry picked from commit 44746461dcead5b42cc2177346c26aee79151c86)

15 years agos3:build: add install-dbwrap_tool target
Michael Adam [Fri, 15 May 2009 13:41:41 +0000 (15:41 +0200)]
s3:build: add install-dbwrap_tool target

Michael
(cherry picked from commit a62e72b825117dc45d434fd1b3645633b5d063d6)
(cherry picked from commit 85e38ebde54fb403dcdcb9da39880c7d776034c6)

15 years agos3:build dbwrap_tool with make everything
Michael Adam [Fri, 15 May 2009 13:41:26 +0000 (15:41 +0200)]
s3:build dbwrap_tool with make everything

Michael
(cherry picked from commit b4131ecf811e6f42ebec4154a911a3dfa8416a56)
(cherry picked from commit bf0c69834671a6dd6a43a89d6a8abd98f6afaf5f)

15 years agos3:build: rename OBJ collection for dbwrap_tool consistently
Michael Adam [Fri, 15 May 2009 09:58:17 +0000 (11:58 +0200)]
s3:build: rename OBJ collection for dbwrap_tool consistently

Michael
(cherry picked from commit ad240e199893a5e89cdd5161134171cc600266b8)
(cherry picked from commit c118d03a2b15b75a5025158956a8d8f99682d55c)

15 years agos3:first cut at dbwrap_tool - a tdb tool that is CTDB-aware.
Michael Adam [Thu, 14 May 2009 23:48:55 +0000 (01:48 +0200)]
s3:first cut at dbwrap_tool - a tdb tool that is CTDB-aware.

This tool (in contrast to tdbtool) reads Samba's configuration
and if clustering = yes, it talks to CTDB instead of accessing
the TDB data bases directly. This is done by simply using
the dbwrap mechanim, just like the Samba daemons.

This first version can read and write int32 and uint32 values
and delete records from a (c)tdb database.
More operations will follow.

This tool can already be useful in CTDB environments, e.g. when
"net idmap restore" fails to set the USER and GROUP HWM keys,
because the methods are deliberately not implemented in
idmap_tdb2.c. You can manually set the high water marks
with
"dbwrap_tool store idmap_tdb2.tdb 'USER HWM' int32 12345"
and
"dbwrap_tool store idmap_tdb2.tdb 'GROUP HWM' int32 67890"

Michael
(cherry picked from commit 6d82b5975598f1742c53ebdaa2fa89f7cf148b85)
(cherry picked from commit 5085c853e87cc5875b1a38e6558a5412a69e1d08)

15 years agos3-samr: in _samr_QueryUserInfo() make sure to not return any info in error case.
Günther Deschner [Fri, 15 May 2009 12:34:50 +0000 (14:34 +0200)]
s3-samr: in _samr_QueryUserInfo() make sure to not return any info in error case.

Guenther
(cherry picked from commit 59192bf03f3781fe6a21be66a7374ea72cac71f4)
(cherry picked from commit b5b5718552f44ac4fc961c38eb3a8ff02eab18f9)

15 years agos3-samr: use normal integer in r->in.level switch statements.
Günther Deschner [Thu, 14 May 2009 22:31:16 +0000 (00:31 +0200)]
s3-samr: use normal integer in r->in.level switch statements.

Guenther
(cherry picked from commit 51271ab739e5a239faf2367cc0e25e34a9cd9170)

15 years agos3-netapi: implement NetShutdownInit_r and NetShutdownAbort_r.
Günther Deschner [Wed, 13 May 2009 14:38:26 +0000 (16:38 +0200)]
s3-netapi: implement NetShutdownInit_r and NetShutdownAbort_r.

Guenther
(cherry picked from commit 8fdb499497f8d4f4a1ca93ffc94de8b57c2c1568)
(cherry picked from commit efaf83fadea2e7b13441d08d82a3a1d27571d16d)

15 years agos3-netapi: add example code for NetShutdownInit and NetShutdownAbort.
Günther Deschner [Wed, 13 May 2009 14:38:00 +0000 (16:38 +0200)]
s3-netapi: add example code for NetShutdownInit and NetShutdownAbort.

Guenther
(cherry picked from commit 80f0d819fb85bdfbd85e910fccc62e778bea3a83)
(cherry picked from commit de33ca38880aa10fbd57ce45f2defdf83c379879)

15 years agos3-netapi: add NetShutdownInit and NetShutdownAbort to public API.
Günther Deschner [Wed, 13 May 2009 14:35:45 +0000 (16:35 +0200)]
s3-netapi: add NetShutdownInit and NetShutdownAbort to public API.

Guenther
(cherry picked from commit 1ddc4829aec61d952aaf3185cc56d53d4a9b5c3c)
(cherry picked from commit afca1d6cd2a184d7b8f70847db143761d5497ac6)

15 years agos3-netapi: add NetShutdownInit and NetShutdownAbort skeletons.
Günther Deschner [Wed, 13 May 2009 14:27:58 +0000 (16:27 +0200)]
s3-netapi: add NetShutdownInit and NetShutdownAbort skeletons.

Guenther
(cherry picked from commit 8fd3c8902c5e953a0ddf184b08f9e37f954ee12e)
(cherry picked from commit fb8cbd7f7e078754faf7fb0b9f071aecbb19d401)

15 years agos3-build: re-run make samba3-idl.
Günther Deschner [Wed, 13 May 2009 14:17:36 +0000 (16:17 +0200)]
s3-build: re-run make samba3-idl.

Guenther
(cherry picked from commit 3a2c748cf4626266899103aa719ea6ac2eae3a9f)
(cherry picked from commit e1c76e41b9f517fea6aa79ba9c0f21b76ab31258)

15 years agos3-netapi: add NetShutdownInit and NetShutdownAbort.
Günther Deschner [Wed, 13 May 2009 14:16:33 +0000 (16:16 +0200)]
s3-netapi: add NetShutdownInit and NetShutdownAbort.

I know, they don't exist as such calls on windows but having them in
libnetapi.so would be very handy.

Guenther
(cherry picked from commit e272acf4848b6c5944acc685b0738e520b3039fb)
(cherry picked from commit 7f904f0b50dc59282f8804fcd87407d0ee3af918)

15 years agoTurn on SHORTNAME-TEST in torture.
Jeremy Allison [Thu, 14 May 2009 23:50:50 +0000 (16:50 -0700)]
Turn on SHORTNAME-TEST in torture.
Jeremy.
(cherry picked from commit 99771d2e23b476d1a7becd9f394421363dd0dffe)

15 years agoMake us pass SHORTNAME-TEST.
Jeremy Allison [Thu, 14 May 2009 23:49:18 +0000 (16:49 -0700)]
Make us pass SHORTNAME-TEST.
Jeremy
(cherry picked from commit 82d9d7b2136a236d3f2b7b1255a920a1ef394ffe)

15 years agoMake error message clearer on fail.
Jeremy Allison [Thu, 14 May 2009 23:30:11 +0000 (16:30 -0700)]
Make error message clearer on fail.
Jeremy.
(cherry picked from commit f81698c70e2513c4699048263c0d6d57a5a9bc64)

15 years agoAdd a test showing what ascii values cause an NTFS volume to
Jeremy Allison [Thu, 14 May 2009 22:56:13 +0000 (15:56 -0700)]
Add a test showing what ascii values cause an NTFS volume to
create a mangled name. We don't pass this yet, but it's not
run by default.
Jeremy.
(cherry picked from commit 18d9e7074635c80052e8bb8d85ad5605663e2695)

15 years agoRemove one use of mangle_is_8_3(), not needed.
Jeremy Allison [Thu, 14 May 2009 19:34:28 +0000 (12:34 -0700)]
Remove one use of mangle_is_8_3(), not needed.
Jeremy.
(cherry picked from commit 0e7f37336ec2d7e1158342fb855af3dff84a7d1e)

15 years agos3-printing: no need to define struct table_node 4 times.
Günther Deschner [Tue, 12 May 2009 12:15:01 +0000 (14:15 +0200)]
s3-printing: no need to define struct table_node 4 times.

Guenther
(cherry picked from commit 652251701df7dec1401eab9b1dbc7e3ac5c7e7ad)
(cherry picked from commit e6b6027218b96bf3357837d051ca5d2df0d88561)

15 years agos3-net: Fix bug 6340: don't segfault when cleartext trustdom pwd could not be retrieved.
Günther Deschner [Wed, 13 May 2009 13:17:46 +0000 (15:17 +0200)]
s3-net: Fix bug 6340: don't segfault when cleartext trustdom pwd could not be retrieved.

Guenther
(cherry picked from commit e88de848c0228cd515b4e356aafe5d7207e49d75)

15 years agos4-selftest: match new name of RPC-SAMR-ACCESSMASK.
Günther Deschner [Wed, 13 May 2009 13:15:30 +0000 (15:15 +0200)]
s4-selftest: match new name of RPC-SAMR-ACCESSMASK.

Guenther
(cherry picked from commit c3e61b54606175858d2221e5f4a75f2fcf149631)
(cherry picked from commit 198fd3f89c2ce60523c755c1917b7bca25436bf1)

15 years agos4-smbtorture: split RPC-SAMR-ACCESSMASK into several tests.
Günther Deschner [Wed, 13 May 2009 13:14:20 +0000 (15:14 +0200)]
s4-smbtorture: split RPC-SAMR-ACCESSMASK into several tests.

Guenther
(cherry picked from commit 675e52cde78906a63fe96e6d34aab92eb710c6b2)
(cherry picked from commit 7c44471f567dc1775f5b4ebf216475b1f348c42a)

15 years agos4-smbtorture: cosmetic cleanup for RPC-SAMR-ACCESSMASK.
Günther Deschner [Wed, 13 May 2009 01:18:07 +0000 (03:18 +0200)]
s4-smbtorture: cosmetic cleanup for RPC-SAMR-ACCESSMASK.

Guenther
(cherry picked from commit 2abdfab613b9487138612bf4ad0422ce4771d7cc)
(cherry picked from commit 737ac891e0be2fafbbc1e2c60f081268b7c0c3a1)

15 years agoRevert "s3: checkin .po for pam_winbind" because of license issue.
Bo Yang [Wed, 13 May 2009 13:54:06 +0000 (21:54 +0800)]
Revert "s3: checkin .po for pam_winbind" because of license issue.

This reverts commit 43388521b8f31757309fb8bec71ad9ee0f3b21de.
(cherry picked from commit 0c54e8b3e4f9d7efe1974fa39a039997196b6309)

15 years agos3: checkin .po for pam_winbind
Bo Yang [Wed, 13 May 2009 10:59:55 +0000 (18:59 +0800)]
s3: checkin .po for pam_winbind

Signed-off-by: Bo Yang <boyang@samba.org>
(cherry picked from commit 8611f03dbb0c45d8755725232508cff258b426d5)
(cherry picked from commit 43388521b8f31757309fb8bec71ad9ee0f3b21de)

15 years agos3 onefs: Self-contend level2 oplocks on BRL
Zack Kirsch [Mon, 11 May 2009 17:10:43 +0000 (17:10 +0000)]
s3 onefs: Self-contend level2 oplocks on BRL
(cherry picked from commit 3627ceb5e25cdecd1a8113a5028cc898a1424349)
(cherry picked from commit de68d52c8b7b101ad37d3eb09456bcb31e687906)

15 years agos3 onefs: Fix ignore sacl parameter
Tim Prouty [Wed, 13 May 2009 00:38:10 +0000 (17:38 -0700)]
s3 onefs: Fix ignore sacl parameter
(cherry picked from commit c2482d6b23f769d8a5fa4141f9540a25c985d7cc)
(cherry picked from commit b2ba00adc91d18e7356dd0375cf7c24cefe21ed0)

15 years agos3: Fix strict locking with chained reads
Tim Prouty [Tue, 12 May 2009 23:32:32 +0000 (16:32 -0700)]
s3: Fix strict locking with chained reads

Move the strict lock/unlock code down a level for reads to avoid
calling chain_reply before the unlock.
(cherry picked from commit c60bb39df355c2ef36e4cfdff69cc348adc6dae1)
(cherry picked from commit 4fe9f5e1204fd5578a6043ad314614dc541decda)

15 years agos3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.
Aravind Srinivasan [Thu, 16 Apr 2009 20:42:40 +0000 (20:42 +0000)]
s3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.

This is very similar to be1dfff02d562e42a7847bd02fed8538630d3f41
(cherry picked from commit 5aefb44bf04becc6b80e7c3bf038d79851c5b0f9)
(cherry picked from commit d07c3437aa9f6262abab87bc298c74fd953ebcfc)

15 years agos3-spoolss: move SPL_ARCH_X defines to IDL.
Günther Deschner [Tue, 12 May 2009 12:12:31 +0000 (14:12 +0200)]
s3-spoolss: move SPL_ARCH_X defines to IDL.

Guenther
(cherry picked from commit 7403dd39d608e07f107530819277738ebd20a320)
(cherry picked from commit 37d0afc095e43d707ff3b86c9ebda22e8a10f77f)

15 years agospoolss: add SPOOLSS_ARCHITECTURE_ALL to IDL.
Günther Deschner [Tue, 12 May 2009 12:11:03 +0000 (14:11 +0200)]
spoolss: add SPOOLSS_ARCHITECTURE_ALL to IDL.

Guenther
(cherry picked from commit a4f558da79e5746124b79583ca608b394e635ad3)
(cherry picked from commit 295035c7cf353a4e1ba5e6e8737ef78329acee8b)

15 years agos3-build: re-run make samba3-idl.
Günther Deschner [Tue, 12 May 2009 23:38:06 +0000 (01:38 +0200)]
s3-build: re-run make samba3-idl.

Guenther
(cherry picked from commit b716e57bef3b42c4be24b5d41c05dbc0665f5191)
(cherry picked from commit 6c06db0bfb0a88c1a85f559bdda16156e1722cbc)

15 years agoinitshutdown: add shutdown reason codes.
Günther Deschner [Tue, 12 May 2009 23:37:30 +0000 (01:37 +0200)]
initshutdown: add shutdown reason codes.

Guenther
(cherry picked from commit c07f4a1299700cf6d530aee390972d3324ba0566)
(cherry picked from commit ce9dcd96497aec1c66ce3df9bb4e83e3346b724a)

15 years agos3-netdomjoin-gui: prepare to call out for NetRenameMachineInDomain() to rename computers
Günther Deschner [Tue, 12 May 2009 20:46:36 +0000 (22:46 +0200)]
s3-netdomjoin-gui: prepare to call out for NetRenameMachineInDomain() to rename computers
in domains.

Guenther
(cherry picked from commit 6154b031f4521fad4b5c460643da59dd918b240a)
(cherry picked from commit a53f9e695bd09b166085d8c714f323ff1d0ce1c6)

15 years agoerror-codes: add some more WERRORs to table.
Günther Deschner [Tue, 12 May 2009 21:50:37 +0000 (23:50 +0200)]
error-codes: add some more WERRORs to table.

These tables really should be auto-generated at some point...

Guenther
(cherry picked from commit aa84ca6e6ba66536ca32dc5792d27e2169589a14)
(cherry picked from commit 35d03a151606f2971b171370af19fd227748213f)

15 years agos3-netdomjoin-gui: Fix join prompt dialog test.
Günther Deschner [Tue, 12 May 2009 21:47:21 +0000 (23:47 +0200)]
s3-netdomjoin-gui: Fix join prompt dialog test.

Guenther
(cherry picked from commit d3a9ee689d636f13f7935d1ddfccfdd4f4e8527a)
(cherry picked from commit 7533e32075ac8b162c230ed112974f421e0d1569)

15 years agos3-netdomjoin-gui: use NetServerGetInfo() level 101 to get hostname.
Günther Deschner [Tue, 12 May 2009 20:15:04 +0000 (22:15 +0200)]
s3-netdomjoin-gui: use NetServerGetInfo() level 101 to get hostname.

Guenther
(cherry picked from commit 3e2975b3bdd247d1e3e7c74bada2f85a1936acaf)
(cherry picked from commit 4298e296f02a4df182d5d2ee2623bc869b321c53)

15 years agos3-netdomjoin-gui: inspect the correct computername string before
Günther Deschner [Tue, 12 May 2009 20:12:47 +0000 (22:12 +0200)]
s3-netdomjoin-gui: inspect the correct computername string before
enabling/disabling the change button.

Guenther
(cherry picked from commit 20b5fc02d2e97dbd51d84cc05ac887e274b14866)
(cherry picked from commit c7ca84fd4a4c58771b47252248b00e6bb5c411a1)

15 years agos3:loadparm: free the file_list at the start of loadparm
Michael Adam [Wed, 6 May 2009 00:25:08 +0000 (02:25 +0200)]
s3:loadparm: free the file_list at the start of loadparm

This should reduce the waste of memory when using "config file"
or "config backend". It also reduces the risk of triggering
reloads due to some old unused files being checked.

Michael
(cherry picked from commit 6708b926a47b53a2984de6af9bb9d319ed6efe58)
(cherry picked from commit 25b0c51c8db62b5e7b12cab19b4dd2fa699ed67e)

15 years agos3:loadparm: refactor freeing of file_list out into free_file_lists()
Michael Adam [Wed, 6 May 2009 00:09:56 +0000 (02:09 +0200)]
s3:loadparm: refactor freeing of file_list out into free_file_lists()

Michael
(cherry picked from commit 6aef9bbbf7160cf9e79c50e13632bf29efaedb65)
(cherry picked from commit 2f63ee84f29f15b6173ffc20b7debad2b91eafe6)

15 years agos3:build: extend the support fo Debian GNU/kFooBar to kOpenSolaris
Michael Adam [Fri, 8 May 2009 22:10:51 +0000 (00:10 +0200)]
s3:build: extend the support fo Debian GNU/kFooBar to kOpenSolaris

As suggested by Robert Millan.

Michael
(cherry picked from commit 66dff4073d0013bfd11ac29e341765141393ea23)
(cherry picked from commit aca044014a7c20b1e4d9babc8710865b9b7610ce)

15 years agos3:build: support non-linux gnu ports
Michael Adam [Thu, 30 Apr 2009 19:59:07 +0000 (21:59 +0200)]
s3:build: support non-linux gnu ports

This is based on a patch by the debian package maintainers,
adapted for the merged branch.

Michael
(cherry picked from commit 5fba1e938c59492872d026c452cbbf8d2239c95f)
(cherry picked from commit dd699425f80a1b1fa158b2386c2b10338b656298)

15 years agos3:proto.h: remove old param/params.c prototype
Michael Adam [Mon, 11 May 2009 05:43:07 +0000 (07:43 +0200)]
s3:proto.h: remove old param/params.c prototype

Michael
(cherry picked from commit a04bac71356139c62d786f6254d33bd247fb7692)
(cherry picked from commit b0a46b6abd265e484e89912eb7b9e1feb1b917c2)