obnox/samba-ctdb.git
15 years agosmbd: some write time fixes
Stefan Metzmacher [Mon, 8 Sep 2008 13:12:24 +0000 (15:12 +0200)]
smbd: some write time fixes

- only the first non truncating write causes
  the write time update with 2 seconds delay.
  It's not enough to check for an existing update event
  as it will be NULL after the event was triggered.

- SMBwrite truncates always update the write time
  unless the sticky write time is set.

- SMBwrite truncates don't trigger a write time update on close.

metze
(cherry picked from commit be8ac33179f56296118435e2732ccffdf7ddd305)

15 years agoWhen setting an NFSv4 ACL, map generic bits
Volker Lendecke [Mon, 8 Sep 2008 14:42:06 +0000 (16:42 +0200)]
When setting an NFSv4 ACL, map generic bits
(cherry picked from commit dbe7a61be2beac50d1665e38ac374cefbbabec00)
(cherry picked from commit 77b3ca1a4be4ae780186ab4d46ec114b8dea41a8)

15 years agoFix debug message to show correct function name.
Jeremy Allison [Sat, 6 Sep 2008 03:39:37 +0000 (20:39 -0700)]
Fix debug message to show correct function name.
Jeremy.
(cherry picked from commit 7150f8e89c93be7d122e19f650522be591544611)

15 years agoWrite times code update.
Jeremy Allison [Sat, 6 Sep 2008 02:01:32 +0000 (19:01 -0700)]
Write times code update.

Ok, here's the fix for the write times breakage
with the new tests in S4 smbtorture.

The key is keeping in the share mode struct
the "old_file_time" as the real write time,
set by all the write and allocation calls,
and the "changed_write_time" as the "sticky"
write time - set by the SET_FILE_TIME calls.

We can set them independently (although I
kept the optimization of not setting the
"old_file_time" is a "changed_write_time"
was already set, as we'll never see it.

This allows us to update the write time
immediately on the SMBwrite truncate case,
SET_END_OF_FILE and SET_ALLOCATION_SIZE calls,
whilst still have the 2 second delay on the
"normal" SMBwrite, SMBwriteX calls.

I think in a subsequent patch I'd like to
change the name of these from "old_file_time"
to "write_time" and "changed_write_time" to
"sticky_write_time" to make this clearer.

I think I also fixed a bug in Metze's original
code in that once a write timestamp had been
set from a "normal" SMBwriteX call the fsp->update_write_time_triggered
variable was set and then never reset - thus
meaning the write timestamp would never get
updated again on subsequent SMBwriteX's.

The new code checks the update_write_time_event
event instead, and doesn't update is there's
an event already scheduled.

Metze especially, please check this over for
your understanding.

Jeremy.
(cherry picked from commit aff490ef3b32b3bb2c11cf35ed3fa0272178da3f)

15 years agoRemove unecessary msync.
Jeremy Allison [Fri, 5 Sep 2008 22:33:40 +0000 (15:33 -0700)]
Remove unecessary msync.
Jeremy.
(cherry picked from commit 24ea36f2c772468d4906145520b48f4857d4eeb7)

15 years agoFix a memleak
Qiao Yang [Fri, 5 Sep 2008 12:08:09 +0000 (14:08 +0200)]
Fix a memleak

request.extra_data is not freed if there is no extra_data in response or
when there is some error happens in processing. This patch will free the
buffer right after processing a request before sending back a response.
(cherry picked from commit be6f12273f171a3eb1967d2299064e57d737f6a4)
(cherry picked from commit c1fcc41bd96652b175b41421a5f6a9396c75e67f)

15 years agoDo proper error handling if the socket is closed
Volker Lendecke [Fri, 5 Sep 2008 09:48:36 +0000 (11:48 +0200)]
Do proper error handling if the socket is closed

This is a step in fixing bug 5707.

Thanks to Igor Galić <i.galic@brainsware.org> for reporting!

Volker
(cherry picked from commit 1558a5c1977b1f87600ec487238fa8db009f41fd)
(cherry picked from commit 6a561d311496569dd5db0c6d6461ce9c4896f142)

15 years agoconfigure: fix typo in GNU ld version-script test.
Michael Adam [Fri, 5 Sep 2008 09:39:38 +0000 (11:39 +0200)]
configure: fix typo in GNU ld version-script test.

Michael
(cherry picked from commit 0d9f3dfc4c139938ee57b6cf60c29cf4ce404be7)
(cherry picked from commit a943b154c6f86b22e77e56640d6dbe9a040f15e8)

15 years agoFix winbindd crash bug with trusted domains. Bug #5736
James Ding [Thu, 4 Sep 2008 22:15:56 +0000 (15:15 -0700)]
Fix winbindd crash bug with trusted domains. Bug #5736
(cherry picked from commit ea4d67cc7ba4eb05f0761208d70849a42bf25864)

15 years agoget rid of unneeded argument in get_methods and get_alloc_methods
Herb Lewis [Thu, 4 Sep 2008 21:35:27 +0000 (14:35 -0700)]
get rid of unneeded argument in get_methods and get_alloc_methods
(cherry picked from commit 89347b57d57e287e0762e97f7870323279802c92)

15 years agoCleanup of DC enumeration in get_dcs()
Steven Danneman [Wed, 3 Sep 2008 22:31:39 +0000 (15:31 -0700)]
Cleanup of DC enumeration in get_dcs()

This is a fix for a few small inefficiencies/bugs in the get_dcs() path.

* because the third add_one_dc_unique() loop was outside the ADS check all DCs
  returned from the non-sitename lookup were being tacked onto the dc_name_ip
  list twice.
* add_one_dc_unique() now checks if the given IP address already exists before
  adding it to the list, making the returned list actually unique
* added more thorough doxygen comment headers
(cherry picked from commit 10996c444fcb7e2418c3e8f396cc631f6b325786)

15 years agokerberos: fix indent of enc type lines in generated krb5.conf files.
Günther Deschner [Thu, 4 Sep 2008 13:11:22 +0000 (15:11 +0200)]
kerberos: fix indent of enc type lines in generated krb5.conf files.

Guenther
(cherry picked from commit 18a26f08b6fab4119a1421a7ca59c32dde8bb8cb)
(cherry picked from commit b737b0869066eafe5af4518692ec0a1522387031)

15 years agoFix bug #5729. Explicitly allow "-valid".
Jeremy Allison [Wed, 3 Sep 2008 20:05:45 +0000 (13:05 -0700)]
Fix bug #5729. Explicitly allow "-valid".
Jeremy
(cherry picked from commit 5349a1d373fb186cff1031077199070db2b6db90)

15 years agoThe msync manpage reports that msync *must* be called before munmap. Failure to do...
Simo Sorce [Wed, 3 Sep 2008 14:44:09 +0000 (10:44 -0400)]
The msync manpage reports that msync *must* be called before munmap. Failure to do so may result in lost data. Fix an ifdef check, I really think we meant to check HAVE_MMAP here.
(cherry picked from commit de8f483254ec59c7cf678d8c03e07c0c241f6d7b)

15 years agosamu_set_unix() does not use the rid allocator, but forces to use the
Simo Sorce [Sun, 13 Jul 2008 02:44:15 +0000 (22:44 -0400)]
samu_set_unix() does not use the rid allocator, but forces to use the
algoritmic allocator unconditionally, this is wrong an inconsistent.
Use samu_alloc_rid_unix() instead.
(If we create a new user we should do it in a way consistent with all
other commands like pdbedit -a and net rpc user add.)
(cherry picked from commit e1d4db8f55b25c7e9c408cb334fb89ccfd4c6565)

15 years agoFix bug spotted by Simo - don't use legacy if expired entry.
Jeremy Allison [Wed, 27 Aug 2008 01:04:54 +0000 (18:04 -0700)]
Fix bug spotted by Simo - don't use legacy if expired entry.
Jeremy.
(cherry picked from commit d25c0bcfa85e2c5bf20334fd715cc52526f9c8bf)

15 years agoDon't ask winbindd if we got a -ve cache entry.
Jeremy Allison [Tue, 26 Aug 2008 23:13:49 +0000 (16:13 -0700)]
Don't ask winbindd if we got a -ve cache entry.
Jeremy.
(cherry picked from commit dc623f3923f3fd6561a629d52ad85e54e04a7af1)

15 years agoFix the build :-(. Ask winbindd if we find a negative cache entry (or should
Jeremy Allison [Tue, 26 Aug 2008 22:51:05 +0000 (15:51 -0700)]
Fix the build :-(. Ask winbindd if we find a negative cache entry (or should
we just call the legacy function ?).
Jeremy.
(cherry picked from commit 8a66edd823d3daa49f2d1f429e9139449174d421)

15 years agoGet smbd to look (read-only) into the winbindd cache for uid/gid <--> sid mappings.
Jeremy Allison [Tue, 26 Aug 2008 21:51:37 +0000 (14:51 -0700)]
Get smbd to look (read-only) into the winbindd cache for uid/gid <--> sid mappings.
Jeremy.
(cherry picked from commit 95d1d5941da703d39bec43c387a5e981294eb2e3)

15 years agoIncrease the default positive idmap cache time to a week
Volker Lendecke [Fri, 15 Aug 2008 16:24:09 +0000 (18:24 +0200)]
Increase the default positive idmap cache time to a week
(cherry picked from commit 5caabdf64ea3d8ff0ff997a565b7708986c3d9d7)

15 years agoMove idmap_cache.c from winbindd/ to lib/
Volker Lendecke [Fri, 15 Aug 2008 17:08:27 +0000 (19:08 +0200)]
Move idmap_cache.c from winbindd/ to lib/
(cherry picked from commit 6b25b938824c544beed9d4a3aca0bd548587936e)

15 years agomount.cifs: unclear error message with "credentials"
Steve French [Tue, 26 Aug 2008 18:01:15 +0000 (13:01 -0500)]
mount.cifs: unclear error message with "credentials"

Thanks to Christophe Curis for the suggestion
(cherry picked from commit fbb78cfaa71e152c4840c92896f181926de8d58e)

15 years agorun make idl after idl change "Handle arbitrary new PAC types"
Michael Adam [Tue, 26 Aug 2008 14:09:50 +0000 (16:09 +0200)]
run make idl after idl change "Handle arbitrary new PAC types"

Michael
(cherry picked from commit 5de253ba1308f470a47f9e5f83c6eccd17e95c26)
(cherry picked from commit 02836d45bc15d546f765f4f95c84d9b3ac5d4b57)

15 years agoHandle arbitrary new PAC types
Andrew Tridgell [Sun, 24 Aug 2008 04:00:58 +0000 (14:00 +1000)]
Handle arbitrary new PAC types

When MS introduces a new PAC type, we should just ignore it, not
generate a parse error. New PAC info structures are supposed to be
backwards compatible with old ones
(cherry picked from commit 2971b926c835412b02c93ad1e30f1471bc0a3612)
(cherry picked from commit de628055ff81ffd2f2ee3b8a4949a69c4c512570)

15 years agoEINVAL is also a valid error return, meaning "this filesystem
Andrew Tridgell [Tue, 26 Aug 2008 04:06:42 +0000 (14:06 +1000)]
EINVAL is also a valid error return, meaning "this filesystem
cannot do sendfile for this file"
(cherry picked from commit 737f664604b28f230be63bfc2f3d516fd9eb1c63)
(cherry picked from commit 1cd01dbd7aa98c5bf60a3dac77ee07e342f7f06b)

15 years agobecome root for AIO operations
Andrew Tridgell [Sun, 24 Aug 2008 03:58:05 +0000 (13:58 +1000)]
become root for AIO operations

We need to become root for AIO read and write to allow the AIO thread
to send a completion signal to the parent process when the IO
completes
(cherry picked from commit c548e5c69f9d8bc85a654f4d29d64c735a5e780b)
(cherry picked from commit 898f1d86b048bf457468b2af8191f4e86d72e438)

15 years agoAvoid a race condition in glibc between AIO and setresuid().
Andrew Tridgell [Sun, 24 Aug 2008 03:56:59 +0000 (13:56 +1000)]
Avoid a race condition in glibc between AIO and setresuid().

See this test: http://samba.org/~tridge/junkcode/aio_uid.c

The problem is that setresuid() tries to be clever about threads, and
tries to change the euid of any threads that are running. If a AIO read
or write completes while this is going on then the signal from the thread
where the IO completed is lost, as it gets -1/EPERM from rt_sigqueueinfo()

The simplest fix is to try to use setreuid() instead of setresuid(),
as setreuid() doesn't try to be clever. Unfortunately this also means
we must use become_root()/unbecome_root() in the aio code.
(cherry picked from commit 56c5a6f024875bb79b0104beb36f6b0ec1e1e9f9)
(cherry picked from commit 6b1291bdd4f8145c73684a679f895d0958df4e66)

15 years agofixed an errno handling bug that could lead to an infinite loop
Andrew Tridgell [Sun, 24 Aug 2008 03:53:19 +0000 (13:53 +1000)]
fixed an errno handling bug that could lead to an infinite loop
(cherry picked from commit 5ccdc58ce91ee40ca7171dd040191291aeb7fe02)
(cherry picked from commit 2cd7bedcb7d5d9c218dae2cc08b1131d844b738b)

15 years agofixed tsmsm_sendfile(). The logic was totally broken.
Andrew Tridgell [Sat, 23 Aug 2008 01:36:27 +0000 (11:36 +1000)]
fixed tsmsm_sendfile(). The logic was totally broken.
(cherry picked from commit 794e48b809036871287df8416a2c669b7e26f216)
(cherry picked from commit 44fcdd73b059b83f0dca86237881d76c95649714)

15 years agoAdd workaround for docs build and dependency on parameters.all.xml
Gerald (Jerry) Carter [Mon, 25 Aug 2008 21:08:28 +0000 (16:08 -0500)]
Add workaround for docs build and dependency on parameters.all.xml
(cherry picked from commit d4f5b5255f9b95050ddd9d67bd3958402be77918)
(cherry picked from commit c8154142d97ccf973feb36d77f932c893fda0af5)
(cherry picked from commit c91e7e9f7f392d5ba850619395eddac34617f1e4)

15 years agodoserr: add WERR_WRONG_PASSWORD.
Günther Deschner [Mon, 1 Sep 2008 15:07:33 +0000 (17:07 +0200)]
doserr: add WERR_WRONG_PASSWORD.

Guenther
(cherry picked from commit 977fec76b77639403ba9ab7bb00c57601e23493d)
(cherry picked from commit 06442555c2a99c5efd70326337d991e5bd410734)

15 years agoFix Coverity ID 587
Volker Lendecke [Mon, 1 Sep 2008 11:46:27 +0000 (13:46 +0200)]
Fix Coverity ID 587

The following test program prints "8" on 64-bit :-)

static void print_size(const char lenbuf[4])
{
        printf("sizeof(lenbuf) = %d\n", (int)sizeof(lenbuf));
}
int main(void)
{
        const char lenbuf[4];
        print_size(lenbuf);
        return 0;
}

Jeremy, please check :-)

Volker
(cherry picked from commit 9daea0ccfdda58450be3c9a9a94c016f5900c319)
(cherry picked from commit 5f082003bdd0bb06b391cb0dd0cf6287ba3b99c8)

15 years agoFix Coverity ID 589, dead code
Volker Lendecke [Sun, 31 Aug 2008 10:15:35 +0000 (12:15 +0200)]
Fix Coverity ID 589, dead code
(cherry picked from commit 67c0835226e189deba5856710a1dea19ac5f30fd)
(cherry picked from commit 9d6bfc6c216304f31456cf181dc5e23824e2e54f)

15 years agoRemove a duplicate retval check
Volker Lendecke [Sun, 31 Aug 2008 09:45:12 +0000 (11:45 +0200)]
Remove a duplicate retval check

Jeremy, please check!
(cherry picked from commit 6579005e6490f1a99b3860627ba51decaeb864bd)
(cherry picked from commit bdc3d9833ac448f56eeccfed70133e712e91c078)

15 years agoFix Coverity ID 592
Volker Lendecke [Sun, 31 Aug 2008 09:34:01 +0000 (11:34 +0200)]
Fix Coverity ID 592

The scanner did not figure out that we always have a primary domain, so it
complained about us potentially passing a NULL pointer down to
set_domain_online_request() where it is dereferenced.

Make the code a bit clearer.
(cherry picked from commit e6e8d108f95ed974f98f3f57adcfbbde4e00fad9)
(cherry picked from commit 70dbc13aaef893b25e3164fdcf187a01ec27b392)

15 years agoDeal with systems that don't initialize birthtime correctly.
Jeremy Allison [Fri, 29 Aug 2008 16:28:51 +0000 (09:28 -0700)]
Deal with systems that don't initialize birthtime correctly.
Pointed out by SATOH Fumiyasu <fumiyas@osstech.jp>.
Jeremy.
(cherry picked from commit 21d067c5dbf1e5b7233e9af9c60df25403f79afb)

15 years agonetapi: fix NetGetJoinableOUs_l.
Günther Deschner [Fri, 29 Aug 2008 11:31:55 +0000 (13:31 +0200)]
netapi: fix NetGetJoinableOUs_l.

It needs to try the dns domain name for the
ads connection.

Guenther
(cherry picked from commit 918eae8221bb8c24084cad96556e4d8c3685e314)
(cherry picked from commit 2fa3bf836cfa7108e4f47314c58a70218f8cf31a)

15 years agonetapi: fix some warnings in netdomjoin-gui.
Günther Deschner [Fri, 29 Aug 2008 10:59:56 +0000 (12:59 +0200)]
netapi: fix some warnings in netdomjoin-gui.

Guenther
(cherry picked from commit e69eb09c1819eb4ea4bba7c3b3b0f8b6da789632)
(cherry picked from commit 3b80e5faa69ebfc57ddcb951995d156929aa4759)

15 years agonetapi: use NETSETUP join flags in examples.
Günther Deschner [Fri, 29 Aug 2008 10:52:23 +0000 (12:52 +0200)]
netapi: use NETSETUP join flags in examples.

Guenther
(cherry picked from commit 2f6f888d9cf89abf55767dc43a9e3d5de68bbcfb)
(cherry picked from commit d9306cff741d62364ab556980b5f9bf9cf0d5260)

15 years agonetapi: add NetJoinFlags to public header.
Günther Deschner [Fri, 29 Aug 2008 10:46:38 +0000 (12:46 +0200)]
netapi: add NetJoinFlags to public header.

Guenther
(cherry picked from commit 3babf758f49d6b08af8bd41c1dc8bd8de11a3893)
(cherry picked from commit 2c66d15daf3dba6d186f48068ac57ab2ae066c8f)

15 years agore-run make idl.
Günther Deschner [Fri, 29 Aug 2008 10:46:18 +0000 (12:46 +0200)]
re-run make idl.

Guenther
(cherry picked from commit 11a2eecf2a92dceef2b89bbfa08abcfb71bcaf7a)
(cherry picked from commit 839729b3d36380bafeabada3fbb3a0b63be1f6f2)

15 years agonetapi: add NetJoinFlags to IDL.
Günther Deschner [Fri, 29 Aug 2008 10:46:01 +0000 (12:46 +0200)]
netapi: add NetJoinFlags to IDL.

Guenther
(cherry picked from commit 10345cb987f8652f5e94e612910bfcd0478b26bc)
(cherry picked from commit b0fe82982577e1738679dd892e0abe7de7561c77)

15 years agonetapi: add info21_to_USER_INFO_11 and support level 11 in NetUserEnum/GetInfo.
Günther Deschner [Thu, 28 Aug 2008 10:22:19 +0000 (12:22 +0200)]
netapi: add info21_to_USER_INFO_11 and support level 11 in NetUserEnum/GetInfo.

Guenther
(cherry picked from commit c022ec38521e7ff655fc12807fcfd0e4f056e18b)
(cherry picked from commit 855577e0dbf112529eadc78805e102708c4df9b5)

15 years agonetapi: add info21_to_USER_INFO_4 and support level 4 in NetUserEnum/GetInfo.
Günther Deschner [Thu, 28 Aug 2008 10:21:13 +0000 (12:21 +0200)]
netapi: add info21_to_USER_INFO_4 and support level 4 in NetUserEnum/GetInfo.

Guenther
(cherry picked from commit b3ccc9a447c380e2898606b8f392f8bec9f40dc9)
(cherry picked from commit eea316020e54a615a33d80be35224fbbf00fc826)

15 years agonetapi: add info21_to_USER_INFO_3 and support level 3 in NetUserEnum/GetInfo.
Günther Deschner [Thu, 28 Aug 2008 10:20:04 +0000 (12:20 +0200)]
netapi: add info21_to_USER_INFO_3 and support level 3 in NetUserEnum/GetInfo.

Guenther
(cherry picked from commit 6b56b70a47823ab482f0c2a5fb55a759857b99f0)
(cherry picked from commit 1c93e23eab988a0607dd32387b3903f25744dbda)

15 years agonetapi: add info21_to_USER_INFO_2 and support level 2 in NetUserEnum/GetInfo.
Günther Deschner [Thu, 28 Aug 2008 10:18:01 +0000 (12:18 +0200)]
netapi: add info21_to_USER_INFO_2 and support level 2 in NetUserEnum/GetInfo.

Guenther
(cherry picked from commit 1f1587423b7e01be552ae7cfc89f1334b32b124a)
(cherry picked from commit ae73457839f511862f6b6819ba9366e2b94819ca)

15 years agonetapi: add info21_to_USER_INFO_1 and support level 1 NetUserEnum/GetInfo.
Günther Deschner [Thu, 28 Aug 2008 10:15:23 +0000 (12:15 +0200)]
netapi: add info21_to_USER_INFO_1 and support level 1 NetUserEnum/GetInfo.

Guenther
(cherry picked from commit 391aaf16272aad09f8e2f1b1afb78a2535c0faaf)
(cherry picked from commit 15305394766b3c15d45f17b2a2c222be01c8b821)

15 years agonetapi: add info21_to_USER_INFO_23.
Günther Deschner [Thu, 28 Aug 2008 10:08:31 +0000 (12:08 +0200)]
netapi: add info21_to_USER_INFO_23.

Guenther
(cherry picked from commit 62871cb3829f5b9cd15211030fa409dbaf3b906f)
(cherry picked from commit 7904037756af4c70b14710ab0aea9b45fe655942)

15 years agonetapi: add info21_to_USER_INFO_20.
Günther Deschner [Thu, 28 Aug 2008 10:07:25 +0000 (12:07 +0200)]
netapi: add info21_to_USER_INFO_20.

Guenther
(cherry picked from commit 93a5844814714cf07341bc2962dfac5c3e51d788)
(cherry picked from commit 3fe5e21243a689c67860315f1b1eac75edcea080)

15 years agonetapi: add info21_to_USER_INFO_10.
Günther Deschner [Thu, 28 Aug 2008 10:05:43 +0000 (12:05 +0200)]
netapi: add info21_to_USER_INFO_10.

Guenther
(cherry picked from commit 3e0c5d4154a730fd9e4430d3e64f9c7bb654dc54)
(cherry picked from commit 438da6c5a373985864896774d9e6b5685d8aad43)

15 years agonetapi: add builtin handle to NetUserEnum.
Günther Deschner [Thu, 28 Aug 2008 10:00:07 +0000 (12:00 +0200)]
netapi: add builtin handle to NetUserEnum.

Guenther
(cherry picked from commit f71b0808bec002f616fc451eddb7e19dd242a138)
(cherry picked from commit a2f6ed041cfa1c985a500ce85d6b4f8a8436c165)

15 years agonetapi: prepare libnetapi_samr_lookup_user to lookup priv levels.
Günther Deschner [Thu, 28 Aug 2008 09:57:43 +0000 (11:57 +0200)]
netapi: prepare libnetapi_samr_lookup_user to lookup priv levels.

Guenther
(cherry picked from commit f61bf5db5ff4a1d051999712dd76788d6a113545)
(cherry picked from commit 2c9e691d25edcbb03cf9147720f458724b869ff4)

15 years agore-run make idl.
Günther Deschner [Thu, 28 Aug 2008 09:54:32 +0000 (11:54 +0200)]
re-run make idl.

Guenther
(cherry picked from commit 227fd242d1a3c911b704208694be6d1ffd1aee67)
(cherry picked from commit 0b1a9b48581a771ff36d0547801c35a2352eae5c)

15 years agonetapi: add USER_MAXSTORAGE_UNLIMITED to IDL.
Günther Deschner [Thu, 28 Aug 2008 09:54:16 +0000 (11:54 +0200)]
netapi: add USER_MAXSTORAGE_UNLIMITED to IDL.

Guenther
(cherry picked from commit 71623f853d475eac8b4293d454706c3288bcbc10)
(cherry picked from commit 1599c07d094a4d4ace11d1569b7709bb83bd2faa)

15 years agonetapi: add NetShareAdd example code.
Günther Deschner [Wed, 27 Aug 2008 23:02:42 +0000 (01:02 +0200)]
netapi: add NetShareAdd example code.

Guenther
(cherry picked from commit 4ec041e38a7dd2d89b182ab9e03ab85a060778d3)
(cherry picked from commit 9c51d8c4550dd199a63c11b576eb91229b9c555b)

15 years agonetapi: implement NetShareAdd_r.
Günther Deschner [Wed, 27 Aug 2008 23:02:01 +0000 (01:02 +0200)]
netapi: implement NetShareAdd_r.

Guenther
(cherry picked from commit d430d2fbd8746c8bcdb16e027d45a939c4976524)
(cherry picked from commit cf5a745a6b099b874c94fecb58346a1cd73a3d75)

15 years agonetapi: add NetShareAdd to public header.
Günther Deschner [Wed, 27 Aug 2008 23:06:12 +0000 (01:06 +0200)]
netapi: add NetShareAdd to public header.

Guenther
(cherry picked from commit 5a036a431f4a8c686ddcd72df476acc6befddba0)
(cherry picked from commit 83fc3024899e0749e770854d2f55d7599ae609c8)

15 years agonetapi: add NetShareAdd skeleton.
Günther Deschner [Wed, 27 Aug 2008 23:01:11 +0000 (01:01 +0200)]
netapi: add NetShareAdd skeleton.

Guenther
(cherry picked from commit 6e22bcc1f5cba9bc37ecf193bbc7e031b69134f5)
(cherry picked from commit 567ce3cd9beb75c03a94e7c966af13b6dfa5c37a)

15 years agore-run make idl.
Günther Deschner [Wed, 27 Aug 2008 22:58:50 +0000 (00:58 +0200)]
re-run make idl.

Guenther
(cherry picked from commit 72c660757fd3a5b20ec6de0e4ada361e0aa9e2c4)
(cherry picked from commit 848339062cc1a87d6b055ae13a79c30f4a13b10c)

15 years agonetapi: add NetShareAdd to IDL.
Günther Deschner [Wed, 27 Aug 2008 22:58:24 +0000 (00:58 +0200)]
netapi: add NetShareAdd to IDL.

Guenther
(cherry picked from commit 58d3a682631aa1fc3d90078db7c301de77cb7e73)
(cherry picked from commit 187087525f62ad539c200233b6eb549da6619cb8)

15 years agonetapi: add samr_rid_to_priv_level().
Günther Deschner [Wed, 27 Aug 2008 22:56:25 +0000 (00:56 +0200)]
netapi: add samr_rid_to_priv_level().

Guenther
(cherry picked from commit 51afae499974f3ad73a1c9bdfbc41e3130966ebc)
(cherry picked from commit bd8a684ad8362ec698d94000862b461db7840e22)

15 years agonetapi: better point out what levels are unknown in NetUserEnum.
Günther Deschner [Wed, 27 Aug 2008 22:23:51 +0000 (00:23 +0200)]
netapi: better point out what levels are unknown in NetUserEnum.

Guenther
(cherry picked from commit d85182aa54b936f8c85c6dcd10d5df613de4bb21)
(cherry picked from commit 5285ff81c2bdb362e2bf917f0b20bd35460688e8)

15 years agonetapi: add AF_OP constants to public header.
Günther Deschner [Wed, 27 Aug 2008 21:43:01 +0000 (23:43 +0200)]
netapi: add AF_OP constants to public header.

Guenther
(cherry picked from commit a06e21782a4970840f5a8c65b633c9654443161d)
(cherry picked from commit 86816c273665a837440304a9d6785a2016aa23de)

15 years agore-run make idl.
Günther Deschner [Wed, 27 Aug 2008 21:41:55 +0000 (23:41 +0200)]
re-run make idl.

Guenther
(cherry picked from commit 1c8bec98456dbd5bcc319a9d7378e4a9399db40d)
(cherry picked from commit 61c05e17c2a4dccd6fef8c932157d29d432fa9ac)

15 years agonetapi: add AF_OP constants to IDL.
Günther Deschner [Wed, 27 Aug 2008 21:40:44 +0000 (23:40 +0200)]
netapi: add AF_OP constants to IDL.

Guenther
(cherry picked from commit 2bd24258782811a014a191650883d50d4bf7d0b0)
(cherry picked from commit d4654eeca4317b650159d939311023cff05e8159)

15 years agonetapi: add USER_PRIV_* constants to public header.
Günther Deschner [Wed, 27 Aug 2008 20:38:32 +0000 (22:38 +0200)]
netapi: add USER_PRIV_* constants to public header.

Guenther
(cherry picked from commit 2274e5d8a8236b15558507289a8a455c15ca2633)
(cherry picked from commit 9050441870a1da5f3d9818be9abea1f5a6dee0e5)

15 years agore-run make idl.
Günther Deschner [Wed, 27 Aug 2008 20:36:19 +0000 (22:36 +0200)]
re-run make idl.

Guenther
(cherry picked from commit cb1236dd50d0511d8ad2be30c1d9b7b8191ec83c)
(cherry picked from commit ec9c01e45afdc5956e0413d351784ebcdfbb1917)

15 years agonetapi: add USER_PRIV_* constants to IDL.
Günther Deschner [Wed, 27 Aug 2008 20:35:14 +0000 (22:35 +0200)]
netapi: add USER_PRIV_* constants to IDL.

Guenther
(cherry picked from commit 3bb042d0e14e8a4f1feaace7f310143ff44a933a)
(cherry picked from commit b647c9f90132591f925f1c55f99735425e31aa10)

15 years agonetapi: give more correct error code in NetUserGetInfo.
Günther Deschner [Wed, 27 Aug 2008 17:28:34 +0000 (19:28 +0200)]
netapi: give more correct error code in NetUserGetInfo.

Guenther
(cherry picked from commit c66651b6fb023e5b0952fd135589eb955f51fa12)
(cherry picked from commit 01a5eaad7394f77898c7596231fb07d6ce251515)

15 years agonetapi: always return correct account name in NetUserGetInfo/NetUserEnum.
Günther Deschner [Wed, 27 Aug 2008 17:26:37 +0000 (19:26 +0200)]
netapi: always return correct account name in NetUserGetInfo/NetUserEnum.

Guenther
(cherry picked from commit 47768bfb01815f7b6bf687fe04ca7d19385aea59)
(cherry picked from commit 1ac44d51e882b477fbfb3bbb863e9aad61820cb9)

15 years agonetapi: add samr_acb_flags_to_netapi_flags for NetUserEnum and NetUserGetInfo.
Günther Deschner [Wed, 27 Aug 2008 17:25:07 +0000 (19:25 +0200)]
netapi: add samr_acb_flags_to_netapi_flags for NetUserEnum and NetUserGetInfo.

Guenther
(cherry picked from commit 2f2c60bf91e1e2b3b24c4bb39ac598cb3c704158)
(cherry picked from commit 51c94ba608d9db6dfd286d3e7becf7e90cac049e)

15 years agonetapi: display all available levels in NetUserGetInfo example.
Günther Deschner [Wed, 27 Aug 2008 17:16:30 +0000 (19:16 +0200)]
netapi: display all available levels in NetUserGetInfo example.

Guenther
(cherry picked from commit 814c9a4f663ea354291456407accbc3fe7edccf6)
(cherry picked from commit 2acd976b8a3914d1bff2f9da3890ed89e5339ac6)

15 years agonetapi: fix public header for USER_INFO_4.
Günther Deschner [Wed, 27 Aug 2008 17:15:32 +0000 (19:15 +0200)]
netapi: fix public header for USER_INFO_4.

Guenther
(cherry picked from commit f54b24c70afb28b6897ce258929ab2c97f255d86)
(cherry picked from commit fdc4a834c64bede1f6c1f689c1e88c304e2b3e7c)

15 years agore-run make idl.
Günther Deschner [Wed, 27 Aug 2008 17:15:02 +0000 (19:15 +0200)]
re-run make idl.

Guenther
(cherry picked from commit 9d33627d723c582f723982d090858e01bf5bd8c8)
(cherry picked from commit 520da2175b14ea6160f03c92ba628f82990005b5)

15 years agonetapi: fix IDL for USER_INFO_4.
Günther Deschner [Wed, 27 Aug 2008 17:14:32 +0000 (19:14 +0200)]
netapi: fix IDL for USER_INFO_4.

Guenther
(cherry picked from commit ca69c442f2007d46729a6fce920800d25195e946)
(cherry picked from commit 2cb665637488f656fc970a36a41d4743427886d2)

15 years agonet: now that "net rpc user" uses netapi calls exclusivly, net rpc shell needs
Günther Deschner [Wed, 27 Aug 2008 11:54:49 +0000 (13:54 +0200)]
net: now that "net rpc user" uses netapi calls exclusivly, net rpc shell needs
to use netapi as well.

Guenther
(cherry picked from commit 2f730649b73dcd11734d12921bfdad982fe75717)
(cherry picked from commit 0cc57d2cfaf4e652a8091dec7149ef160db3a591)

15 years agonet: use netapi for "net rpc user info" to enumerate user group membership.
Günther Deschner [Wed, 27 Aug 2008 11:47:04 +0000 (13:47 +0200)]
net: use netapi for "net rpc user info" to enumerate user group membership.

Guenther
(cherry picked from commit 77ecfff216b24b0d4b1ce79bee13c18bffa7b533)
(cherry picked from commit a53ce98430b66dd5a3aa4e277143eab652aa44ff)

15 years agonetapi: implement NetUserGetGroups_r.
Günther Deschner [Wed, 27 Aug 2008 11:37:56 +0000 (13:37 +0200)]
netapi: implement NetUserGetGroups_r.

Guenther
(cherry picked from commit 1ed8fefdae85e9b9f2794e502c8c1c41d9ba0615)
(cherry picked from commit e1f2627bfb5c60bd6edb7cf91d002e770a61a869)

15 years agonetapi: add NetUserGetGroups example code.
Günther Deschner [Wed, 27 Aug 2008 11:14:24 +0000 (13:14 +0200)]
netapi: add NetUserGetGroups example code.

Guenther
(cherry picked from commit 33e9baeb26a469445b6750c4bd2f00b4140f0554)
(cherry picked from commit 178200ec4d05e3b33f931e7f33a80417b7a26ee4)

15 years agonetapi: add NetUserGetGroups to public headers.
Günther Deschner [Wed, 27 Aug 2008 11:13:57 +0000 (13:13 +0200)]
netapi: add NetUserGetGroups to public headers.

Guenther
(cherry picked from commit 2f95b7d9b5ad513e43d7d41ce9fb87300ec357a8)
(cherry picked from commit 892930d1c5a08b62edbb5f31ffa6afbb1160ff24)

15 years agonetapi: fix NetUserSetInfo return code for currently unsupported levels.
Günther Deschner [Wed, 27 Aug 2008 09:55:57 +0000 (11:55 +0200)]
netapi: fix NetUserSetInfo return code for currently unsupported levels.

Guenther
(cherry picked from commit 10bd55d68a91b76e82c3ba1d113729f97830a46a)
(cherry picked from commit 0c52304d0cec22966a6c614d526407ff5be3f88e)

15 years agonetapi: add skeleton for NetUserGetGroups.
Günther Deschner [Wed, 27 Aug 2008 09:49:55 +0000 (11:49 +0200)]
netapi: add skeleton for NetUserGetGroups.

Guenther
(cherry picked from commit a21ec57b2887012777f9580959a37cd23a412029)
(cherry picked from commit bae069d048214679a8d73c22a61a2e582e7b099f)

15 years agore-run make idl.
Günther Deschner [Wed, 27 Aug 2008 09:48:06 +0000 (11:48 +0200)]
re-run make idl.

Guenther
(cherry picked from commit 334a90072318407313057b1c2df5e367e957309b)
(cherry picked from commit e50bb2f5d9cdcb91b2599215399b45f1bac4fcf3)

15 years agonetapi: add NetUserGetGroups to IDL.
Günther Deschner [Wed, 27 Aug 2008 09:47:39 +0000 (11:47 +0200)]
netapi: add NetUserGetGroups to IDL.

Guenther
(cherry picked from commit 4d15d1ff20dee216b2fc064bc19712bd3a9cec70)
(cherry picked from commit 362f94d1fc9adcab4a82d31d63c6d24f99a7626b)

15 years agonet: use netapi function to set user password.
Günther Deschner [Wed, 27 Aug 2008 09:19:49 +0000 (11:19 +0200)]
net: use netapi function to set user password.

Guenther
(cherry picked from commit f31fd1e112ec6477ae0e0eeeede0317c0cdfcbfd)
(cherry picked from commit e7248e67ae2201ddcfdb5ca2bccaf72fd876198f)

15 years agonet: use netapi function to list users.
Günther Deschner [Wed, 27 Aug 2008 09:14:15 +0000 (11:14 +0200)]
net: use netapi function to list users.

Guenther
(cherry picked from commit 6bc8e229192f0bdd1154c6dd0901e4c739647c90)
(cherry picked from commit bc2934653d6b623a95fc2a95b6af1c3f0656a200)

15 years agonetapi: support level 1014 in NetUserSetInfo.
Günther Deschner [Wed, 27 Aug 2008 00:18:30 +0000 (02:18 +0200)]
netapi: support level 1014 in NetUserSetInfo.

Guenther
(cherry picked from commit 38178965a2f641978b666452f86fdcd258e8709b)
(cherry picked from commit f1423ebce30b102cb8d479f392fd6383f59fd833)

15 years agonetapi: support level 1024 in NetUserSetInfo.
Günther Deschner [Wed, 27 Aug 2008 00:11:54 +0000 (02:11 +0200)]
netapi: support level 1024 in NetUserSetInfo.

Guenther
(cherry picked from commit 84bc7bf1adcde270ad20bba67345c0beed0b1d66)
(cherry picked from commit e286fecf02c44e8d1492f528abb0d23766584b2a)

15 years agonetapi: support level 1051 in NetUserSetInfo.
Günther Deschner [Wed, 27 Aug 2008 00:02:30 +0000 (02:02 +0200)]
netapi: support level 1051 in NetUserSetInfo.

Guenther
(cherry picked from commit 8da3b1cacb4ffa7ce8932dc0e9ceb78395d49b98)
(cherry picked from commit 7cdb6aae8c476da79b7a86704f9ff70745598f2e)

15 years agonetapi: support level 1053 in NetUserSetInfo.
Günther Deschner [Tue, 26 Aug 2008 23:53:10 +0000 (01:53 +0200)]
netapi: support level 1053 in NetUserSetInfo.

Guenther
(cherry picked from commit 039904f601755678fcbdef7d6bdc1c6da0082b83)
(cherry picked from commit cde3ad1c1d422acc8d33b2bc5dd274068bf0602a)

15 years agonetapi: support level 1052 in NetUserSetInfo.
Günther Deschner [Tue, 26 Aug 2008 23:47:33 +0000 (01:47 +0200)]
netapi: support level 1052 in NetUserSetInfo.

Guenther
(cherry picked from commit ff8dede3b369d39ec5638eec8a73bd6397e3d94b)
(cherry picked from commit b19550e6deb6a5501b1b97e2d465358f3d0ff7f6)

15 years agore-run make idl.
Günther Deschner [Tue, 26 Aug 2008 23:44:40 +0000 (01:44 +0200)]
re-run make idl.

Guenther
(cherry picked from commit 3235ac063bca3805b749ee7ce27028a6828af3e9)
(cherry picked from commit 881fd23abfa6373818764d5da14ba617f6d216c9)

15 years agonetapi: add usriX_profile/usriX_home_dir_drive/usriX_primary_group_id to USER_INFO_X...
Günther Deschner [Tue, 26 Aug 2008 23:43:52 +0000 (01:43 +0200)]
netapi: add usriX_profile/usriX_home_dir_drive/usriX_primary_group_id to USER_INFO_X in IDL.

Guenther
(cherry picked from commit 59e27519adebd45cbd5207cfa5df212d11ca648b)
(cherry picked from commit aa06ded5e2c59b3ccfd363081e4f5857ea7e440a)

15 years agonetapi: support level 1006 in NetUserSetInfo.
Günther Deschner [Tue, 26 Aug 2008 23:40:46 +0000 (01:40 +0200)]
netapi: support level 1006 in NetUserSetInfo.

Guenther
(cherry picked from commit 9c5ea4e8e8deb0a2be5f894fb5de96f0dea48120)
(cherry picked from commit 595d1cbe4b5b294801195c1e88ba0fa62e01dbe0)

15 years agonetapi: support level 1012 in NetUserSetInfo.
Günther Deschner [Tue, 26 Aug 2008 23:36:49 +0000 (01:36 +0200)]
netapi: support level 1012 in NetUserSetInfo.

Guenther
(cherry picked from commit db650e9b6ead70152b2640415477bb26d0b16097)
(cherry picked from commit a68e839426d26ec5a03e2cd7065e45ae68383dd0)

15 years agonetapi: fix acct_flags handling in convert_USER_INFO_X_to_samr_user_info21.
Günther Deschner [Tue, 26 Aug 2008 23:36:06 +0000 (01:36 +0200)]
netapi: fix acct_flags handling in convert_USER_INFO_X_to_samr_user_info21.

Guenther
(cherry picked from commit d3625b321f666bd506603b7c58ee89cd6b902d86)
(cherry picked from commit 3573c5adcc77d05f692f7ad13562152937b80a33)

15 years agonetapi: support level 1009 in NetUserSetInfo.
Günther Deschner [Tue, 26 Aug 2008 23:15:21 +0000 (01:15 +0200)]
netapi: support level 1009 in NetUserSetInfo.

Guenther
(cherry picked from commit 3a6c784284c8eb7e2b05afa6db16b27ee26ff352)
(cherry picked from commit a35d49bb4ce497d0a1f15e1a28806d2d4b6cec2c)

15 years agonetapi: support level 1011 in NetUserSetInfo.
Günther Deschner [Tue, 26 Aug 2008 23:04:21 +0000 (01:04 +0200)]
netapi: support level 1011 in NetUserSetInfo.

Guenther
(cherry picked from commit b3680c0482ae05b32e9cf9fbddea57f0dd6e2bd3)
(cherry picked from commit e089f16f7792bb2a9bddef753312c6f89abb3af6)

15 years agonetapi: fix convert_USER_INFO_X_to_samr_user_info21.
Günther Deschner [Tue, 26 Aug 2008 22:57:07 +0000 (00:57 +0200)]
netapi: fix convert_USER_INFO_X_to_samr_user_info21.

Guenther
(cherry picked from commit 3f726952eb9a1fed0f4a990c82a2c47a5c0775be)
(cherry picked from commit cb33c53dc0529f86232176b73f073a5bc7a993ed)

15 years agonetapi: support level 1003 in NetUserSetInfo.
Günther Deschner [Tue, 26 Aug 2008 22:33:49 +0000 (00:33 +0200)]
netapi: support level 1003 in NetUserSetInfo.

Guenther
(cherry picked from commit 863827eb2d5210350011055dda4319070bd1c520)
(cherry picked from commit b2409eb1ae12190d4db536d02640700108da5d40)