1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

4721 Commits

Author SHA1 Message Date
Volker Lendecke
e3367284ab s3 async wbclient: Change license to LGPLv3+ 2009-05-29 18:17:39 +02:00
Günther Deschner
bff54b90c3 util: move add_gid_to_array_unique to toplevel and add add_uid_to_array_unique.
Guenther
2009-05-29 13:49:58 +02:00
Volker Lendecke
0dbecbbee5 Make sid_binstring & friends take a talloc context 2009-05-28 11:33:21 +02:00
Volker Lendecke
3194ad2838 Add smbldap_pull_sid 2009-05-28 10:52:04 +02:00
Marc VanHeyningen
a4887e250b s3: Allow child processes to exit gracefully if we are out of fds
When we run out of file descriptors for some reason, every new
connection forks a child that immediately panics causing smbd to
coredump.  This seems unnecessarily harsh; with this code change we
now catch that error and merely log a message about it and exit
without the core dump.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-27 13:16:17 -07:00
Volker Lendecke
dd0506d15d Attempt to fix the build on NetBSD 2009-05-26 23:20:34 +02:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Michael Adam
f5a5c6a5dc s3:dbwrap_ctdb: fix some function header comments
Michael
2009-05-25 22:16:46 +02:00
Volker Lendecke
7043ef2a79 Don't limit the number of retries in wb_trans.
This is better done with a tevent_req_set_endtime the caller should issue.
2009-05-24 13:51:07 +02:00
Volker Lendecke
f528dbcf2e Don't set a timeout deep inside wb_connect 2009-05-24 13:51:01 +02:00
Volker Lendecke
4906d7fc67 Do queueing in wbclient.c
The _trigger fn must know about wbc_context, while we were waiting in the
queue the fd might have changed
2009-05-24 13:50:43 +02:00
Volker Lendecke
e337124c55 Fix closed_fd(): select returning 0 means no fd listening 2009-05-24 13:50:35 +02:00
Volker Lendecke
6492ffd8df Fix wb_simple_trans queueing 2009-05-24 13:49:59 +02:00
Volker Lendecke
a8e02b591b Add "err_on_readability" to writev_send
A socket where the other side has closed only becomes readable. To catch
errors early when sitting in a pure writev, we need to also test for
readability.
2009-05-24 13:47:29 +02:00
Volker Lendecke
15424162ca Fix wb_trans_done after conversion to unix calling conventions 2009-05-19 23:09:26 +02:00
Volker Lendecke
f1c093c89f Fix an uninitialized variable in wb_context_init 2009-05-19 23:09:26 +02:00
Volker Lendecke
77819597f3 Use TDB_VOLATILE instead of tdb_set_max_dead() 2009-05-19 14:54:53 +02:00
Volker Lendecke
bbbf9f13ad 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
2009-05-18 13:38:55 +02:00
Volker Lendecke
834fc3786e s3-events: Not only timed, also immediate events generate a timeout return 2009-05-17 11:45:22 +02:00
Volker Lendecke
ad91ef7f96 s3-events: If immediate requests are pending, the timeout is 0 2009-05-16 19:22:03 +02:00
Jelmer Vernooij
6230eb94af Update copies of config.guess and config.sub. 2009-05-16 04:03:12 +02:00
Günther Deschner
dccecdf338 s3-privileges: add privilege_delete_account().
Guenther
2009-05-16 01:27:51 +02:00
Günther Deschner
118f343b05 s3-privileges: remove trailing whitespace from privileges codes.
Guenther
2009-05-16 01:27:51 +02:00
Günther Deschner
d800ee5033 s3-netdomjoin-gui: allow to switch between workgroups/domains with the same name.
Guenther
2009-05-15 19:51:03 +02:00
Günther Deschner
8c74d31962 s3-netdomjoin-gui: cosmetic fix for empty hostnames.
Guenther
2009-05-15 19:51:02 +02:00
Günther Deschner
473bf41d20 s3-netdomjoin-gui: only gray out labels when not root and not connecting to
remote machines.

Guenther
2009-05-15 19:51:02 +02:00
Günther Deschner
8fdb499497 s3-netapi: implement NetShutdownInit_r and NetShutdownAbort_r.
Guenther
2009-05-14 14:18:26 +02:00
Günther Deschner
80f0d819fb s3-netapi: add example code for NetShutdownInit and NetShutdownAbort.
Guenther
2009-05-14 14:18:26 +02:00
Günther Deschner
1ddc4829ae s3-netapi: add NetShutdownInit and NetShutdownAbort to public API.
Guenther
2009-05-14 14:18:26 +02:00
Günther Deschner
8fd3c8902c s3-netapi: add NetShutdownInit and NetShutdownAbort skeletons.
Guenther
2009-05-14 14:18:26 +02:00
Volker Lendecke
979f13b19e Fix some nonempty blank lines 2009-05-14 12:14:57 +02:00
Stefan Metzmacher
b9f3a78169 s3:libsmb: move read_smb_send/recv() static in async_smb.c
metze
2009-05-13 18:27:50 +02:00
Günther Deschner
6154b031f4 s3-netdomjoin-gui: prepare to call out for NetRenameMachineInDomain() to rename computers
in domains.

Guenther
2009-05-13 01:56:39 +02:00
Günther Deschner
d3a9ee689d s3-netdomjoin-gui: Fix join prompt dialog test.
Guenther
2009-05-12 23:52:34 +02:00
Günther Deschner
3e2975b3bd s3-netdomjoin-gui: use NetServerGetInfo() level 101 to get hostname.
Guenther
2009-05-12 22:49:05 +02:00
Günther Deschner
20b5fc02d2 s3-netdomjoin-gui: inspect the correct computername string before
enabling/disabling the change button.

Guenther
2009-05-12 22:49:04 +02:00
Jeremy Allison
ad9d64ee1b Clean up assignments to iov_base, ensure it's always cast to void *. This should quieten some warnings with picky compilers on the buildfarm.
Jeremy.
2009-05-12 11:45:37 -07:00
Volker Lendecke
c9efd454c5 Fix bug 6157
This patch picks the alphabetically smallest one of the multi-value attribute
"uid". This fixes a regression against 3.0 and also becomes deterministic.
2009-05-12 15:21:46 +02:00
Jeremy Allison
8a785a6047 Add checks for non_root mode to help buildfarm spoolss tests.
Reviewed by Guenther.
Jeremy.
2009-05-11 09:42:08 -07:00
Volker Lendecke
46dea8c247 wb_int_trans -> wb_simple_trans in wbclient.c 2009-05-09 21:50:24 +02:00
Volker Lendecke
af2189cfed Add wb_simple_trans_send/recv 2009-05-09 21:50:24 +02:00
Volker Lendecke
b475a1e7eb Convert lib/wb_reqtrans.c to unix calling conventions 2009-05-07 22:52:33 +02:00
Volker Lendecke
6f320d0208 Adapt wb_reqtrans to "recent" coding conventions 2009-05-07 22:52:33 +02:00
Jeremy Allison
4cbd0c77e4 Make cli_getatr() async.
Jeremy.
2009-05-05 20:59:22 -07:00
Jeremy Allison
e091fdc565 Make cli_getattrE async.
Jeremy.
2009-05-05 16:28:44 -07:00
Volker Lendecke
7070256f5e Do not crash in ctdbd_traverse if ctdbd is not around 2009-05-04 14:46:17 +02:00
Geza Gemes
5c2404fb86 Fix bug 6136: New AFS syscall conventions
Haven't checked this myself, but as I've already got several reports that Samba
won't compile against current OpenAFS anymore, I just believe Geza Gemes. This
patch only affects AFS code, so it should not hurt anything else.

Volker
2009-05-03 22:16:01 +02:00
Volker Lendecke
79f33674c6 Fix a malloc/talloc mixup 2009-05-02 12:44:31 +02:00
Volker Lendecke
9713476f65 Many build farm boxes do not have clock_gettime 2009-05-01 21:43:25 +02:00
Volker Lendecke
5b7b47f015 Add getaddrinfo_send/recv 2009-05-01 12:30:59 +02:00
Volker Lendecke
8cf75770cf Add fncall_send/recv 2009-05-01 12:30:59 +02:00
Volker Lendecke
db2cc8c9f2 Add thread pool
Included if pthreads are found, can be disabled with --enable-pthreadpool=no

Tim, Steven, I haven't yet seen comments from you. You have been asking for
such a thing at SambaXP. Do you like this? :-)
2009-05-01 12:30:58 +02:00
Günther Deschner
ab4b8c9c04 s3-netapi: Fix Bug #6309: support remote unjoining of Windows 2003 or greater.
Found by David Markey <admin@dmarkey.com>. Thanks!

Guenther
2009-04-30 23:40:09 +02:00
Volker Lendecke
f4fcf2c1c0 Re-import the v3-3 version of str_list_make().
The merged version behaves differently: "Domain Users" is parsed into two
values, as it does not look at quotes. Samba3 users depend on the ability do
say for example

valid users = "domain users"

which would not work anymore with the merged version.

Thanks to Björn Jacke for testing this!

Volker
2009-04-30 13:42:12 +02:00
Günther Deschner
d9805878e2 s3-auth-charcnv: fix push_string(). Don't push to ucs2 and ascii after another.
This fixes all kinds of encrypted passwords used in the shared auth code naturally.
Andrew B., please check.

Guenther
2009-04-27 21:05:40 +02:00
Michael Adam
65527216f1 s3:libsmbconf: fix a comment typo
Michael
2009-04-27 13:25:07 +02:00
Michael Adam
e935d8616b s3:registry: replace typedef REGISTRY_OPS by struct registry_ops
Michael
2009-04-27 11:21:04 +02:00
Jelmer Vernooij
b6981e79df samba3/ldb: Update the ldb_dn API to match that of the Samba 4 LDB:
* ldb_dn_new() now takes an initial DN string
 * ldb_dn_string_compose() -> ldb_dn_new_fmt()
 * dummy ldb_dn_validate(), since LDB DNs in the current implementation
   are always valid if they could be created.
2009-04-23 18:27:32 +02:00
Jelmer Vernooij
9b64073cf7 ldb/samba3: Support event context argument to ldb_init().
This argument is ignored (Samba3's LDB is synchronous) but having it
there is useful for API compatibility with the LDB used by Samba 4 and
available on some systems.
2009-04-23 18:27:31 +02:00
Jelmer Vernooij
598f78bd1f charcnv: Import push_codepoint(). 2009-04-23 17:50:18 +02:00
Volker Lendecke
2146310fb7 Fix a couple of warnings 2009-04-23 14:35:50 +02:00
Volker Lendecke
d7208577f2 Fix a type-punned warning 2009-04-23 14:35:50 +02:00
Volker Lendecke
5abdc58f98 Fix Coverity ID 884: DEADCODE 2009-04-23 10:44:51 +02:00
Jelmer Vernooij
f4195183a4 s3: Use common security_descriptor_equal(). 2009-04-21 18:17:40 +02:00
Günther Deschner
38264bb3b8 s3-secdesc: move all winreg access bits to IDL.
Guenther
2009-04-21 12:42:51 +02:00
Jelmer Vernooij
4c32978d97 Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if
the system one is broken.
2009-04-20 23:58:26 +02:00
Andrew Bartlett
6c9caed481 Merge commit 'origin/master' into libcli-auth-merge-without-netlogond 2009-04-20 16:53:02 +02:00
Jeremy Allison
d9804ae3cc Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+
What a difference a name makes... :-). Just because something is missnamed
SAMR_ACCESS_OPEN_DOMAIN, when it should actually be SAMR_ACCESS_LOOKUP_DOMAIN,
don't automatically use it for a security check in _samr_OpenDomain().
Jeremy.
2009-04-15 15:40:00 -07:00
Andrew Bartlett
4678d1c6f4 Merge branch 'master' of ssh://git.samba.org/data/git/samba into libcli-auth-merge-without-netlogond 2009-04-15 14:36:13 +10:00
Günther Deschner
ca3de0103b netdomjoin-gui: make sure to grey out change fields when not running as root.
Guenther
2009-04-14 23:06:30 +02:00
Andrew Bartlett
baf7274fed Make Samba3 use the new common libcli/auth code
This is particuarly in the netlogon client (but not server at this
stage)
2009-04-14 16:23:44 +10:00
Andrew Bartlett
27815a71a9 More work to adapt to merged libcli/auth function prototypes 2009-04-14 16:23:42 +10:00
Andrew Bartlett
786447dea0 s3:charcnv remove now unused malloc() based conversion functions 2009-04-14 12:54:13 +10:00
Andrew Bartlett
3b3e21bd9b Convert Samba3 to use the common lib/util/charset API
This removes calls to push_*_allocate() and pull_*_allocate(), as well
as convert_string_allocate, as they are not in the common API

To allow transition to a common charcnv in future, provide Samba4-like
strupper functions in source3/lib/charcnv.c

(the actual implementation remains distinct, but the API is now shared)

Andrew Bartlett
2009-04-14 12:53:56 +10:00
Andrew Bartlett
4786a493f7 Solve some of the conflict between Samba3 and Samba4 push_string
This renames push_string in Samba3 into push_string_base and
push_string_check for the two different use cases.

This should allow push_string to be imported from Samba4, using it's
calling conventions.
2009-04-14 12:11:00 +10:00
Volker Lendecke
dcda3ab8ca Reactivate get_socket_port 2009-04-12 14:51:15 +02:00
Günther Deschner
47bda3f3c7 s3-eventlog: split out evlog_convert_tdb_to_evt().
Guenther
2009-04-08 19:45:58 +02:00
Günther Deschner
98d703a6b7 s3-eventlog: move rpc_server/srv_eventlog_lib.c out of rpc_server.
Guenther
2009-04-08 19:45:57 +02:00
Günther Deschner
78951bd7f4 s3-util-sock: add ismyaddr() check in is_myname_or_ipaddr().
Guenther
2009-04-08 12:47:10 +02:00
Andrew Bartlett
6859b805e8 s3:lib Use push_ucs2_talloc() in ms_fnmatch()
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-08 01:15:24 +02:00
Andrew Bartlett
0c22d55134 s3:charcnv Remove unused unistrcpy() and unistrlen()
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 20:51:56 +02:00
Andrew Bartlett
80163b5ac5 s3:charcnv Remove unused unistr2 functions
Natrually, the hard work to make these unsued was done by GD, not me :-)

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 20:51:55 +02:00
Andrew Bartlett
5fff538820 s3:charcnv Remove unused ucs2_to_unistr2()
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 20:51:55 +02:00
Karolin Seeger
6343cab308 s3/smbconf_reg: Fix typo.
Karolin
2009-04-07 20:05:21 +02:00
Andrew Bartlett
042aaffabf s3:smbldap convert the easy cases to push_utf8_talloc()
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 18:55:05 +02:00
Volker Lendecke
ad29104d3d Add read_smb_send/recv, dumping keepalives 2009-04-06 21:32:05 +02:00
Andrew Bartlett
9512640155 s3:smbldap Remove smbldap_get_dn
This removes one more caller to pull_utf8_allocate()

Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06 14:52:51 +02:00
Jeremy Allison
1e742660bf Tidy up some convert_string_internal error cases, found by Andrew Bartlett.
Jeremy.
2009-03-31 18:28:49 -07:00
Jeremy Allison
d942d248d6 Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly. For the clustering case.
Clustered setups should have only ever used
the unsigned version of TDB_DATA in the
first place so they can't be in this mess :-).
Just do the normal upgrade in the clustered case.
Jeremy.
2009-03-27 12:13:13 -07:00
Jelmer Vernooij
30a3dec549 Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec 2009-03-26 15:28:18 +01:00
Volker Lendecke
2d087a0c15 Fix a talloc/malloc screwup in file_lines_pload
Another bug due to careless merge to /lib :-(((

Volker
2009-03-26 14:58:38 +01:00
Günther Deschner
56d74b6212 s3-libnetapi: fix creds in libnetapi_open_ipc_connection().
Jeremy, this broke with 8dd1faaa29. Not sure if
other users broke as well with that change.

Guenther
2009-03-26 10:43:18 +01:00
Günther Deschner
24d5229a81 s3-net: Fix Bug #6102. NetQueryDisplayInformation could return wrong information.
Guenther
2009-03-26 10:29:57 +01:00
Volker Lendecke
a20a710c94 Avahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash 2009-03-26 10:05:27 +01:00
Jelmer Vernooij
c42fc5e103 display_sec: Move to common libcli/security directory. 2009-03-25 21:29:13 +01:00
Jelmer Vernooij
9a61758c1e Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec 2009-03-25 20:51:29 +01:00
Kai Blin
2ff2ceffd2 wbclient: Fix use of wb_int_trans_send, queue parameter must not be NULL 2009-03-24 14:59:11 +01:00
Volker Lendecke
93e13fe3e0 Add tevent avahi binding 2009-03-23 17:09:53 +01:00
Jelmer Vernooij
ca202cf464 Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec 2009-03-20 16:40:09 +01:00
Günther Deschner
3a6133d702 s3-netapi: Fix Coverity #774 (REVERSE_INULL).
Guenther
2009-03-20 11:21:36 +01:00