1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
Commit Graph

3412 Commits

Author SHA1 Message Date
Volker Lendecke
f427d4ce65 Add a in-memory cache
This is a more general API that caches data with a LRU scheme. See
include/cache.h. No comments yet, I'm still working on it. But Jeremy has given
me a hint in one of his checkins that he would like to make use of this now.

The idea is that we get rid of all our silly little caches and merge them all
into one cache that we can then very easily trim, for example even with a
smbcontrol message if someone decides memory is tight. The main user is the
stat cache, this patch also converts the getwd cache. More caches to come.
(This used to be commit 7a911b3571)
2007-12-18 09:56:04 +01:00
Jeremy Allison
2d1b03d67a More static pstring elimination.
Jeremy.
(This used to be commit 92acc0115d)
2007-12-17 18:32:27 -08:00
Jeremy Allison
c8071c3522 Use the %*s feature of snprintf to remove anothe static fstring.
Jeremy.
(This used to be commit 4ae4b23586)
2007-12-17 16:20:44 -08:00
Jeremy Allison
8f28bda7f8 Fix bug #5121 (unix passwd sync not working on a streams based
system).
Jeremy.
(This used to be commit 545cd2139c)
2007-12-17 10:44:09 -08:00
Volker Lendecke
3c490d91f1 get rid of doschar_table[]
If I'm not completely blind, then check_dos_char is *only* used in the case
when we can't mmap() valid.dat. To me this looks as if we initialize the 65536
bits in doschar_table[] with check_dos_char_slowly, use it once to initialize
valid_table[] and *never* use them again. I think there's no point in keeping
these 8k of modified memory around for an unlikely case (no "valid.dat") and
even that only to use it exactly once.
(This used to be commit 0bfea7259e)
2007-12-16 10:57:01 -08:00
Volker Lendecke
e28c6813e0 Tiny fixes to init_valid_table()
(This used to be commit a8948e0727)
2007-12-16 10:57:00 -08:00
Volker Lendecke
2ae400b213 Make init_doschar_table() static
It's only called directly before init_valid_table() anyway, so move it there.
(This used to be commit b6d1d24288)
2007-12-16 10:56:58 -08:00
Volker Lendecke
c335e3322d Make check_dos_char static
It's only called in t_doschar, a pretty bogus test program that is not compiled
by default
(This used to be commit 99c59e809e)
2007-12-16 10:56:55 -08:00
Volker Lendecke
dd4e99c9d7 Remove a static fstring
(This used to be commit a9c62c57db)
2007-12-16 14:02:26 +01:00
Jeremy Allison
0b33d60aff Cope with valgrind > 3.2.x.
Jeremy.
(This used to be commit e799eb8da6)
2007-12-15 23:05:30 -08:00
Volker Lendecke
2e07c2ade8 s/sid_to_string/sid_to_fstring/
least surprise for callers
(This used to be commit eb523ba776)
2007-12-15 22:47:30 +01:00
Volker Lendecke
79cd97cc3f Use dom_sid_string for sid_string_talloc
Remove some code duplication, but introduce one more dependency on librpc/ndr.
Easily turned around so that librpc/ndr depends on lib/util_sid if necessary
(This used to be commit 3a0b1b2060)
2007-12-15 22:33:52 +01:00
Volker Lendecke
4312ad8b98 sid_string_static is no more :-)
We now have four ways to do sid_to_string:

sid_to_string: Convert it into an existing fstring, when you have one

sid_string_talloc: The obvious thing

sid_string_tos: For the lazy, use only with care

sid_string_dbg: The one to use in DEBUG statements
(This used to be commit 7b8276aaa4)
2007-12-15 22:09:37 +01:00
Volker Lendecke
14ef4cdec1 Replace sid_string_static with sid_to_string
This adds 28 fstrings on the stack, but I think an fstring on the stack is
still far better than a static one.
(This used to be commit c7c885078b)
2007-12-15 22:09:37 +01:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Volker Lendecke
f498f661bc Add sid_string_dbg
This makes use of the just added debug_ctx and will kill many
sid_string_static() calls
(This used to be commit 3e4148c280)
2007-12-15 22:09:35 +01:00
Volker Lendecke
db98b92144 Add debug_ctx according to an idea by Tridge
Sorry, Jeremy, I think for debug messages this is just the right way to do it.
(This used to be commit 6312016e27)
2007-12-15 22:09:35 +01:00
Volker Lendecke
2cb7f5f632 add sid_string_talloc
(This used to be commit 9e3ef0923d)
2007-12-15 22:09:35 +01:00
Stefan Metzmacher
16352dd60b add POPT_COMMON_CONFIGFILE which only provides --configfile (not -s)
metze
(This used to be commit af3392cc20)
2007-12-14 19:36:14 +01:00
Stefan Metzmacher
1410c9e37d debug: fix crash bug when DEBUG() is used before setup_logging()
this was introduced by the pstring removal
(1ea3ac8014)

metze
(This used to be commit a412e6c7c6)
2007-12-14 08:22:14 +01:00
Günther Deschner
68a9bd0bf6 Add split_domain_user() (not to mix with winbind variants).
Guenther
(This used to be commit bd5308e5f6)
2007-12-12 00:58:58 +01:00
Jeremy Allison
95c2f313ce Add patches for bug #4866 from jiri sasek - Sun Microsystems - Prague Czech Republic <Jiri.Sasek@Sun.COM>
- slightly modified - Jiri please check !  to allow Solaris to get passwords > 8 chars.
Jeremy.
(This used to be commit 657bf8c347)
2007-12-11 13:16:35 -08:00
Jeremy Allison
7faee02d0d Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
(This used to be commit 52dc5eaef2)
2007-12-10 11:30:37 -08:00
Volker Lendecke
d5ab80054d dbwrap_rbt
This is meant as a replacement for the internal tdb. To me it seems a bit silly
that for in-memory structures we do our own memory management. With this rbt
based approach we can make use of the system-supplied malloc.
(This used to be commit 54e5d44046)
2007-12-10 16:06:32 +01:00
Volker Lendecke
8a8b146ead Make the Linux rbtrees compile within Samba
(This used to be commit c871fd802f)
2007-12-10 16:06:32 +01:00
Volker Lendecke
26a2e818fa Add rbtree.[ch] from the Linux kernel
These are copies taken from 94545baded0bfbabdc30a3a4cb48b3db479dd6ef from Linus' kernel tree
(This used to be commit 8a3289f913)
2007-12-10 16:06:32 +01:00
Volker Lendecke
18c90ed7d8 Add db_tdb_fetch
(This used to be commit efa8764c21)
2007-12-10 16:06:32 +01:00
Volker Lendecke
94a354493a Add dbwrap bystring service routines
(This used to be commit 1e214b536b)
2007-12-10 16:06:32 +01:00
Jeremy Allison
632ab7dc2e Many systems don't have sa_len as part of struct sockaddr.
Revert 5c347cb46d
"Choose a better default for sockaddr length.".
Jeremy.
(This used to be commit 677ac6adc3)
2007-12-09 14:59:07 -08:00
James Peach
8892c7a235 Choose a better default for sockaddr length.
(This used to be commit 5c347cb46d)
2007-12-09 14:02:23 -08:00
James Peach
daba3f8b54 Fix connect(2) callers to use correct sockaddr size.
Some systems (eg Mac OSX 10.5) require the length passed to match
the socket address family. This introduces sys_connect() that does
the right thing, and replaces all uses oc connect(2) with sys_connect().

Note that there are some LGPL callers that still call connect(2)
directly.
(This used to be commit e1bfdc17c4)
2007-12-09 13:28:00 -08:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
ade51769d5 We don't need P_GSTRING or P_UGSTRING anymore.
Jeremy.
(This used to be commit 78dc756000)
2007-12-07 12:43:10 -08:00
Jeremy Allison
acf15ae730 Don't build rpctorture anymore - not maintained. Just remove.
Remove all vestiges of pstring (except for smbctool as noted
in previous commit).
Jeremy
(This used to be commit 4c32a22ac5)
2007-12-07 12:26:32 -08:00
Jeremy Allison
9e8180b983 Remove pstrings completely except for smbctool (what does this do ?).
Don't build this for now.
Jeremy.
(This used to be commit 46b67fd82c)
2007-12-07 12:02:44 -08:00
Jeremy Allison
9e03d6117a *Really* fix the no password -N opt :-).
Jeremy.
(This used to be commit 187d8a94ea)
2007-12-06 19:15:56 -08:00
Jeremy Allison
e7781bd20f Fix the '-N' option.
Jeremy.
(This used to be commit b91b61b54f)
2007-12-06 19:06:34 -08:00
Jeremy Allison
9fdf2d0586 Get closer to building with smbmount. Move parameter line changes
into lib/util.c
Jeremy.
(This used to be commit 6ac5d81655)
2007-12-06 18:49:39 -08:00
Jeremy Allison
c6f0352155 Make cmdline_auth_info private to lib/popt_common.c. Provide
accessor functions.
Jeremy.
(This used to be commit 420195dd3e)
2007-12-06 17:22:57 -08:00
Jeremy Allison
1b92ea5559 Remove pstrings from client/client.c by doing a large rewrite.
Mostly compiles....
Jeremy.
(This used to be commit c87f3eba9a)
2007-12-06 17:16:33 -08:00
Gerald (Jerry) Carter
5d22700782 Compile fix to the automount support. Patch from GlaDiaC.
(This used to be commit 487ab6e75e)
2007-12-05 11:52:35 -06:00
Volker Lendecke
78c6ee0090 Remove some globals
(This used to be commit 31d0a846db)
2007-12-05 14:39:07 +01:00
Volker Lendecke
66af070039 Make share_info_db_init static
(This used to be commit 111502d3a2)
2007-12-05 14:39:07 +01:00
Volker Lendecke
2b17840a0e Remove a static, and "signal_received" needs to be sig_atomic_t
(This used to be commit 8acd4a202f)
2007-12-05 14:39:07 +01:00
Jeremy Allison
3ec5a37280 Ok, down to just the client/*.c code now.
Jeremy.
(This used to be commit 7d3959f81a)
2007-12-04 18:02:06 -08:00
Jeremy Allison
3771ada352 Remove pstring from automount lookups. Remove premature optimization.
Jeremy.
(This used to be commit 6863fe51b5)
2007-12-04 17:48:38 -08:00
Jeremy Allison
74dfee916f Remove tok pstring from util_str.c
Do we even make rpctorture anymore ?
Jeremy.
(This used to be commit fecc3cc45a)
2007-12-04 17:23:19 -08:00
Jeremy Allison
755051b569 pull_ascii_pstring is gone.
Jeremy.
(This used to be commit 288aacce4b)
2007-12-04 17:05:33 -08:00
Jeremy Allison
5ea101f048 Allow STR_TERMINATE and -1 src_len for pull_ucs2_base_talloc().
Jeremy.
(This used to be commit 063358d87a)
2007-12-04 15:21:14 -08:00
Jeremy Allison
6f46f75dfc Make strhex_to_str clear on string limits. Remove pstring from web/*.c
Jeremy.
(This used to be commit f9c8d62389)
2007-12-03 17:17:05 -08:00
Jeremy Allison
bcf033b38e Change tdb_unpack "P" to return a malloc'ed string rather
than expect a pstring space to put data into.
Fix the (few) callers.
Jeremy.
(This used to be commit 7722a7d2c6)
2007-12-03 14:54:06 -08:00
Günther Deschner
6b37d8e627 Fix wkssvc callers.
Guenther
(This used to be commit b734cd8aab)
2007-12-03 18:43:19 +01:00
Michael Adam
66887ddfba Remove workaround for broken capabilites.h from lib/system.c - now in lib/replace.
Michael
(This used to be commit a3fbb53232)
2007-12-03 16:54:13 +01:00
Michael Adam
684a72c779 Reformat configure checks for broken capabilities.h.
Michael
(This used to be commit 834a16225a)
2007-12-03 16:54:12 +01:00
Michael Adam
f5b071e3b0 Move check for broken system capabilites.h headers to lib/replace.
Michael
(This used to be commit 8ec10c4ab1)
2007-12-03 16:54:12 +01:00
Michael Adam
fc0a63153f Add check for ppc statfs.h header to workaround for broken capabilities.h.
Taken from s3:lib/system.c

Michael
(This used to be commit 07e6cfdc62)
2007-12-03 16:54:12 +01:00
Volker Lendecke
b1a924a0fb Fix some bogus uninitialized variable warnings
(This used to be commit 48a162b709)
2007-12-02 23:39:12 +01:00
Jeremy Allison
d1807be93c Fix restart after length count.
Jeremy.
(This used to be commit fa8115f32b)
2007-11-30 14:15:34 -08:00
Günther Deschner
cfbbeebbc6 Avoid to include net prototypes, just reference user creds.
Guenther
(This used to be commit 09e01a4716)
2007-11-30 22:25:01 +01:00
Günther Deschner
9433010f35 Add header file for NetJoinDomain() and friends.
Guenther
(This used to be commit 7cea527e87)
2007-11-30 22:25:01 +01:00
Günther Deschner
9fdb8b82c9 Add NetUnjoinDomain().
Guenther
(This used to be commit fd9d73ad44)
2007-11-30 22:25:01 +01:00
Günther Deschner
ac512a5bb2 Robustness-fixes for NetJoinDomain().
Guenther
(This used to be commit 2d5236cc37)
2007-11-30 22:25:01 +01:00
Günther Deschner
1484b1d174 Give NetJoinDomain() enough time to finish.
Guenther
(This used to be commit 7f021b3cb7)
2007-11-30 22:25:01 +01:00
Günther Deschner
5ee27320ce domain_name is a ref pointer.
Guenther
(This used to be commit b350e482b9)
2007-11-30 22:25:01 +01:00
Günther Deschner
a51e682a21 Add NetJoinDomain call.
Guenther
(This used to be commit 08a5a036ba)
2007-11-30 22:25:01 +01:00
Jeremy Allison
810f760afd Add talloc versions of all the next_token() functions.
Now I can really start removing fixed length strings...
Jeremy.
(This used to be commit 0ae61e2654)
2007-11-30 13:09:04 -08:00
Günther Deschner
4a1fbf7bbf Fix build warning.
Guenther
(This used to be commit bf4881d777)
2007-11-30 01:45:06 +01:00
Jeremy Allison
b7db7c8352 Fix memleak.
Jeremy.
(This used to be commit ccacd17047)
2007-11-29 16:30:18 -08:00
Jeremy Allison
d2cf97aeba Remove the explicit TALLOC_CTX * from cli_struct.
Make us very explicit about how long a talloc ctx
should last.
Jeremy.
(This used to be commit ba9e2be2b5)
2007-11-29 13:24:54 -08:00
Volker Lendecke
a605be7314 Add a warning for a potential bug I've run into
(This used to be commit 223352e323)
2007-11-28 09:45:40 -08:00
Jeremy Allison
6b6655edd9 Remove pstrings from everything except srv_spoolss_nt.c.
Jeremy.
(This used to be commit 0002a9e96b)
2007-11-27 14:35:30 -08:00
Volker Lendecke
1011b32678 Remove some statics
(This used to be commit 1fab16ffb8)
2007-11-27 14:18:47 +01:00
Volker Lendecke
d4bfafa29c Fix bug 5055
(This used to be commit 8bcd2df841)
2007-11-26 15:28:13 +01:00
Volker Lendecke
5d85dd682a Fix a C++ warning
(This used to be commit 9bf5ead4b2)
2007-11-26 14:36:29 +01:00
Tomoki AONO
02571885a9 1. lib/system.c (xattr code for Solaris) could not be
built against c90 compilers. (declaration after
statement.) Sample patch attached.
(This used to be commit 102a247df9)
2007-11-26 09:00:33 +01:00
Volker Lendecke
afc3eee3b8 Add a missing prototype
(This used to be commit 89e2984a84)
2007-11-22 16:00:13 +01:00
Volker Lendecke
734025012f Fix an uninitialized variable
(This used to be commit e8b866ad87)
2007-11-22 16:00:13 +01:00
Volker Lendecke
3f100a5976 Fix a type-punned warning
(This used to be commit 4c992e4340)
2007-11-22 16:00:13 +01:00
Jeremy Allison
dc9237d231 Doh ! Don't use #else when #endif is needed.
Jeremy.
(This used to be commit a04e916b89)
2007-11-21 10:31:18 -08:00
Jeremy Allison
e68bbe3548 Add set_sockaddr_port function for winbindd.
Jeremy.
(This used to be commit 4b47052694)
2007-11-21 10:10:52 -08:00
Jeremy Allison
c049b8157d More trivial pstring removal.
Jeremy.
(This used to be commit bac3bb2f6e)
2007-11-20 15:31:37 -08:00
Jeremy Allison
4c6b01b0ef Remove more pstring. Unify talloc_sub functions to make
them a better match for replacing string_sub. Remove
more unused code.
Jeremy.
(This used to be commit ae7885711f)
2007-11-19 18:56:22 -08:00
Jeremy Allison
cf31bb7532 Start to remove some of the pstring functions we're
no longer using.
Jeremy.
(This used to be commit c21e9bdc10)
2007-11-19 17:51:21 -08:00
Michael Adam
b3976c2ea2 Fix an implicit cast warning.
Michael
(This used to be commit d2c7417393)
2007-11-16 22:22:05 +01:00
Jeremy Allison
acb829ecc3 Add MAX_DNS_NAME_LENGTH, remove more pstrings.
Jeremy.
(This used to be commit a1725f4ff7)
2007-11-15 18:27:26 -08:00
Michael Adam
6028176a39 Fix the build on RHEL5, when libcap-devel is installed.
The /usr/include/sys/capability.h defines _LINUX_TYPES_H
which prevents /usr/include/linux/types.h from being parsed
(when included afterwards). Thus certain types are undefined
that are for instance needed in /usr/include/linux/dqblk_xfs.h.
This breaks the build of lib/sysquotas_xfs.c.

This commit adds a configure check and a workaround for this.

Michael
(This used to be commit 11bcdf780e)
2007-11-16 00:45:59 +01:00
Jeremy Allison
68be9a8200 More pstring removal. This one was tricky. I had to add
one horror (pstring_clean_name()) which will have to
remain until I've removed all pstrings from the client code.
Jeremy.
(This used to be commit 1ea3ac8014)
2007-11-15 14:19:52 -08:00
Jeremy Allison
8e1b0f81c2 alpha_strcpy includes the space for the terminating nul.
Jeremy.
(This used to be commit b3ed3f7e4e)
2007-11-15 13:18:42 -08:00
Jeremy Allison
51b46147f2 Remove smbldap_get_single_pstring() and all pstrings
from pdb_ldap.c. I don't have an LDAP passdb setup here,
so I'm going to need some help on testing this.
Jeremy.
(This used to be commit 00760451b6)
2007-11-14 16:05:42 -08:00
Jeremy Allison
79266500cd Remove all pstrings from smbd/chgpasswd.c.
Jeremy.
(This used to be commit eaf14c701b)
2007-11-12 15:02:50 -08:00
Jeremy Allison
91c1933e67 Remove a pstring.
Jeremy.
(This used to be commit c0412b5d13)
2007-11-11 21:45:55 -08:00
Volker Lendecke
f976f5e067 Convert ctdb_conn.c to enum ndr_error_code
Fix the build
(This used to be commit 432d0e9cb2)
2007-11-11 09:12:37 +01:00
Jeremy Allison
2b3c44e4fb Always define PATH_MAX. Makes code simpler (removes
a bunch of #defines). Remove pstring from msdfs.c.
Jeremy.
(This used to be commit e203ba2227)
2007-11-10 22:31:34 -08:00
Jeremy Allison
6c25260ec1 Remove more static fstring/pstrings. Fix socket option
set on wrong fd (-1).
Jeremy.
(This used to be commit 52fe04df8e)
2007-11-09 15:09:16 -08:00
Stefan Metzmacher
f9578af966 ndr: change NTSTAUS into enum ndr_err_code (samba3 callers)
lib/messages_local.c
rpc_client/ndr.c
smbd/notify_internal.c
utils/net_rpc_registry.c

metze
(This used to be commit c2645d2164)
2007-11-09 21:23:16 +01:00
Volker Lendecke
8a2e7a52c0 nss_wrapper: Fix some warnings
(This used to be commit b401450e84)
2007-11-09 15:16:59 +01:00
Volker Lendecke
333d83e1ee Add some comments
(This used to be commit fc58f2f45a)
2007-11-09 15:14:00 +01:00
Volker Lendecke
62b97b0156 Make base64_encode_data_blob return a talloced string
(This used to be commit 5f205ab48d)
2007-11-09 15:12:30 +01:00
Volker Lendecke
e63bcdd720 Remove the silly "user_socket_options" global variable
This is better done with a 'lp_do_parameter(-1, "socket options", ..);
(This used to be commit 814bed029e)
2007-11-09 15:11:54 +01:00
Volker Lendecke
95b9e23095 Fix dbwrap debug output
(This used to be commit 9f9c933c16)
2007-11-09 15:10:14 +01:00
Stefan Metzmacher
fdc27be1be remove faked_create_user() BUILD_FARM hack as we have nss_wrapper now
metze
(This used to be commit fc98c19048)
2007-11-09 09:53:02 +01:00
metze
c4a20912b1 nss_wrapper: hopefully a better fix for the solaris get*ent_r functions
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25873 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit e0c8c01650)
2007-11-09 09:53:01 +01:00
metze
39d65a9f50 nss_wrapper: revert solaris get*ent_r() functions
This was the wrong approach, as in future lib/replace
should hide this special solaris stuff.

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25872 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 350d6c19e3)
2007-11-09 09:53:01 +01:00
metze
29832ab0fe nss_wrapper: set the destination pointer in the get*_r functions
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25871 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 17b449212a)
2007-11-09 09:53:01 +01:00
metze
f54458939d libreplace: AC_VERIFY_C_PROTOTYPE() needs AC_LANG_SOURCE() to bring in confdefs.h
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25870 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 95dfbd3a6c)
2007-11-09 09:53:00 +01:00
metze
673d502ba3 nss_wrapper: add solaris versions of getpwent_r and getgrent_r
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25868 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 70ea441fe4)
2007-11-09 09:53:00 +01:00
metze
05206ce0c2 libreplace: solaris has different prototypes for getpwent_r and getgrent_r
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25867 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 77900d2ba0)
2007-11-09 09:52:59 +01:00
metze
90d034f7cf nss_wrapper: not all systems have get*_r calls
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25866 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 2451399acb)
2007-11-09 09:52:59 +01:00
metze
ca2ced5c23 libreplace: check for nss passwd|group get*_r functions
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25865 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 8e81dd7356)
2007-11-09 09:52:59 +01:00
metze
7c43422e1b nss_wrapper: add nss_wrapper.pl
This script will be used to add|delete passwd|group entries

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25837 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 28789e60cc)
2007-11-09 09:52:58 +01:00
metze
419c600897 nss_wrapper: add support for groups and return EPERM in initgroups()
The NSS_WRAPPER_GROUP envvar should point to
the /etc/group style file.

Note: NSS_WRAPPER_PASSWD and NSS_WRAPPER_GROUP both
      need non-empty values to enable NSS Wrapper
      support.

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25836 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 6abc84a564)
2007-11-09 09:52:57 +01:00
metze
d2397d7b1b nss_wrapper: add support for passwd accounts
The NSS_WRAPPER_PASSWD envvar should point to
the /etc/passwd style file.

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25835 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 36af3e864c)
2007-11-09 09:52:57 +01:00
metze
6fb510d3f3 nss_wrapper: add lib/nss_wrapper skeleton
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25834 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 0924b0c8de)
2007-11-09 09:52:56 +01:00
jelmer
745b458cee Try to fix building dso's on hpux with gcc
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25886 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 4642af8026)
2007-11-09 09:31:26 +01:00
jelmer
2c50c6143b Try to get some more flags right.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25880 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit ccb39b1844)
2007-11-09 09:30:28 +01:00
jelmer
c0511ba7d3 Add libreplace macro for soname flags.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25877 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 81167d8f38)
2007-11-09 09:29:16 +01:00
jelmer
b26cc8be3d Try to fix the build on some HPUX machines.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25875 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 8d1f54f45d)
2007-11-09 09:27:03 +01:00
Jeremy Allison
3f006ca95a More pstring/fstring removal.
Jeremy.
(This used to be commit 7646f4b284)
2007-11-08 19:00:10 -08:00
Jeremy Allison
5f4693d8f8 Remove more pstring/fstrings.
Jeremy.
(This used to be commit 7a1de5b44e)
2007-11-08 18:50:07 -08:00
Jeremy Allison
7f97c6b96c Remove unneeded variable.
Jeremy.
(This used to be commit c21bc756e3)
2007-11-08 18:01:00 -08:00
Jeremy Allison
214bb0f119 Fix case where we have no dns domain name. Return a talloc of "".
Jeremy.
(This used to be commit ab8934844a)
2007-11-08 17:58:55 -08:00
Jeremy Allison
d40e47db4b Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
(This used to be commit 2a0173743d)
2007-11-08 17:25:45 -08:00
Jeremy Allison
976b0ec487 Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit d9335456d2)
2007-11-08 15:13:41 -08:00
Stefan Metzmacher
9ba9af75d2 libreplace: we need to link to make sure the functions are available
metze
(This used to be commit 130de20d64)
2007-11-08 12:20:16 +01:00
Jeremy Allison
e501c0cd44 Unify the name and addr cache for client_name to
make threading easier ultimately.
Jeremy.
(This used to be commit 48e0725cd6)
2007-11-07 12:48:58 -08:00
Jeremy Allison
1ee8607d4a Fix tdbtorture build.
Jeremy.
(This used to be commit c14db81be5)
2007-11-06 23:13:11 -08:00
Jeremy Allison
99fd77f4ae Fix const warning.
Jeremy.
(This used to be commit ecc2555197)
2007-11-06 23:09:31 -08:00
Jeremy Allison
3809490dd0 Keep the tdb code in sync with Samba4.
Mainly this is the svn changes :

------------------------------------------------------------------------
r23238 | tridge | 2007-05-30 01:15:49 -0700 (Wed, 30 May 2007) | 6 lines

merged transaction lock changes from ctdb

this ensures that having the global lock also implies the transaction
lock

------------------------------------------------------------------------
r22832 | tridge | 2007-05-13 18:00:06 -0700 (Sun, 13 May 2007) | 3 lines

merged the latest tdb changes from ctdb to Samba4

Jeremy.
(This used to be commit ab11c00557)
2007-11-06 22:57:35 -08:00
Jeremy Allison
d8f3c9d078 Fix bug where tdb lock call interrupted with
an alarm sig would not terminate and could lead
to runaway smbd processes.
Thanks to Dave Daugherty @ Centrify for pointing
this out to us.
Jeremy.
(This used to be commit ef8da16983)
2007-11-06 21:47:57 -08:00
metze
4930bab6b8 libreplace: we should only have one location where we check for required functions
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25864 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 760f24f10c)
2007-11-06 09:38:59 +01:00
metze
cfb20163a5 libreplace: we need include <unistd.h> before nss_wrapper.h
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25863 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 20ec1f4725)
2007-11-06 09:38:59 +01:00
jelmer
caa6e6f544 Fix export dynamic for HPUX.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25861 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 4d02b1344b)
2007-11-06 09:38:59 +01:00
jelmer
29725af3be Remove flag that causes problems on some hosts.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25860 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 57bea8cd02)
2007-11-06 09:38:59 +01:00
jelmer
e759ca8492 Wrap native HPUX functions in dl implementation.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25859 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 0ec1672929)
2007-11-06 09:38:58 +01:00
jelmer
29303bd12e Check for HPUX dl functions.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25855 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 9f862e9faf)
2007-11-06 09:38:58 +01:00
jelmer
a2cf98daf0 Move SHLIBEXT determination into a test as well.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25852 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 322cf8002b)
2007-11-06 09:38:58 +01:00
jelmer
b8fdd9e383 Move system-specific ldflags checks to libreplace so they can be used by ldb.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25851 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 63b7690335)
2007-11-06 09:38:58 +01:00
jelmer
1622ab608d Add macro for picflag.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25850 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 48c70f6040)
2007-11-06 09:38:58 +01:00
jelmer
0627ebc620 Add configure test for -Wl,--export-dynamic.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25846 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 4904af51cd)
2007-11-06 09:38:57 +01:00
metze
f16544ad3b libreplace: include nss_wrapper.h if NSS_WRAPPER is defined
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25838 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 809fee4bef)
2007-11-06 09:38:57 +01:00
Jeremy Allison
36441da424 Remove the horror that was the global smb_rw_error.
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
(This used to be commit 255c2adf7b)
2007-11-05 11:12:56 -08:00
Jeremy Allison
536a9e7922 Don't alloc struct iface_struct nics[MAX_INTERFACES]; (128 entries)
on the stack - use talloc.
Jeremy
(This used to be commit b5e37af251)
2007-11-04 22:20:04 -08:00
Jeremy Allison
6a2a27076f This should really be a cond_set_smb_read_error().
Jeremy.
(This used to be commit 5ab76b58c0)
2007-11-04 22:14:19 -08:00
Jeremy Allison
85ff0b2d75 Don't use 0 when we mean SMB_READ_OK.
Jeremy.
(This used to be commit 08ee4314a9)
2007-11-04 22:12:31 -08:00
Günther Deschner
a7be4d50d4 Merge commit 'origin/v3-2-test' into branches/upstream
(This used to be commit d0bf0ad2ae)
2007-11-05 03:39:18 +01:00
Volker Lendecke
2d73e86cce Remove unnecessary code
SAFE_FREE checks for NULL anyway, and SMB_STRDUP panics on failure
(This used to be commit 4cdebda39b)
2007-11-05 03:40:31 +01:00
Günther Deschner
e83e0f3684 Display sec ace flags.
Guenther
(This used to be commit 52bf835c5e)
2007-11-05 03:27:13 +01:00
Jeremy Allison
5b0b4f23ef Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
(This used to be commit 963fc76852)
2007-11-03 23:20:10 -07:00
Jeremy Allison
51a0354d75 Remove more static data from lib/util_sock.c and
callers.
Jeremy.
(This used to be commit 35aaa36f82)
2007-11-03 22:34:46 -07:00
Jeremy Allison
56aa420195 Missed one case where I need to pass down addrlen.
Jeremy
(This used to be commit 62b5ca3334)
2007-11-03 20:27:59 -07:00
Jeremy Allison
25074433f4 I can't get away without a 'length' arg. :-).
Jeremy.
(This used to be commit 95d01279a5)
2007-11-03 18:41:26 -07:00
Jeremy Allison
6658165d5e Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
(This used to be commit e848506c85)
2007-11-03 18:15:45 -07:00
Jeremy Allison
73d4079680 Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
(This used to be commit d50d14c300)
2007-11-03 15:12:42 -07:00
Jeremy Allison
705ba0d5b5 Remove unused var noticed by metze.
Jeremy.
(This used to be commit ac4f897f0d)
2007-11-03 10:25:51 -07:00
Jeremy Allison
753983d7e7 Fix the snprintf checks, and fix a typo in pointer indirection.
These fixes are needed for a working getaddrinfo etc. replacement.
Fixes from Wayne Davison <wayned@samba.org> from rsync.
Jeremy.
(This used to be commit 494bf6293b)
2007-11-02 14:23:10 -07:00
Jeremy Allison
a45c91ec6a Ensure we use the correct socklen_t values for bind() for
Solaris.
Jeremy.
(This used to be commit 638579d75a)
2007-11-02 14:22:19 -07:00
Jeremy Allison
6665739a16 Fix typos in calc_sa_size, noticed by jim.brown@miami.edu
Jeremy.
(This used to be commit 6b7ccd3efb)
2007-11-02 12:56:21 -07:00
Jeremy Allison
e075b3692b Fix Solaris by ensuring we use the IPv4 or IPv6 length
in any getnameinfo calls.
Jeremy
(This used to be commit 4d7badb0c4)
2007-11-02 10:25:34 -07:00
Jeremy Allison
78cdd6e7ec Fix state_path to take a const string, not use pstring.
Jeremy.
(This used to be commit 8c73e19f51)
2007-11-02 09:27:04 -07:00
Gerald (Jerry) Carter
88ee61625a Patch 2 of 3 from Debian Samba packagers:
The point is doing the following associations:

- non discardable state data (all TDB files that may need to be backed
  up) go to statedir
- shared data (codepage stuff) go to codepagedir

The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.

The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
(This used to be commit d6cdbfd875)
2007-11-01 15:53:44 -04:00
Gerald (Jerry) Carter
8132a7b98b Patch from Debian Samba package maintainers:
Patch 1 of 3:

- Patch 1 adds the new variables
- Patch 2 makes uses of them for files belonging to the "state" path
  and the "code pages" path
  This patch seemed more easily acceptable, which explains why we
  separated it from patch 3
- Patch 3 reassigns files to the "cache" path. Indeed all "debatable"
  changes have been moved to that one

The point is adding:

- a path for non discardable state data: basically all TDB files
  that may need to be backed up
- a path for shared data: mostly codepage stuff
- a path for cache data to host files such as
  browse.dat, printers.tbd, <printer>.tdb

All these are currently mixed in "libdir" (${prefix}/lib/samba by default).
The patch keeps these new paths to point to ${prefix}/lib/samba by default
and does therefore not change the software behaviour.  Used alone, it just
adds unused variables...so it can safely be used in sources without any
behaviour change and no impact on Samba developers work.
(This used to be commit b7d2fadbef)
2007-11-01 13:00:10 -04:00
Jeremy Allison
133fad90b5 Make explicit draining the socket on RECVFILE. Add
capability for large UNIX write if not signing and
recvfile set. Cope with large UNIX write length on
incoming processing. Stevef - we can now test 1-16Mb
writes from CIFFS.
Jeremy.
(This used to be commit 8cf78776b0)
2007-10-31 14:01:35 -07:00
Jeremy Allison
ff82c0a037 Handle the disk full error case correctly.
Jeremy.
(This used to be commit b7088bb9c2)
2007-10-30 18:18:40 -07:00
Jeremy Allison
c3250149e1 Add new parameter, "min receivefile size" (by default set
to zero). If non-zero, writeX calls greater than this
value will be left in the socket buffer for later handling
with recvfile (or userspace equivalent). Definition of
recvfile for your system is left as an exercise for
the reader (I'm working on getting splice working :-).
Jeremy.
(This used to be commit 11c03b75dd)
2007-10-30 16:22:24 -07:00
Jeremy Allison
0af071d762 Forgot to add recvfile.c
Jeremy.
(This used to be commit d5886218e5)
2007-10-29 17:17:16 -07:00
Jeremy Allison
d4307679b9 Change all occurrences of zero_addr(&ss,AF_INET) to
zero_addr(&ss). All current uses were always of the
AF_INET form, so simplify the call. If in the future
we need to zero an addr to AF_INET6 this can be
done separately.
Jeremy.
(This used to be commit 2e92418a13)
2007-10-27 20:29:36 -07:00
Volker Lendecke
a97b33baad Two patches
Hi!

Can you check and push them?

Thanks,

Volker

From b488af5905e2dee12a1a72a3b40801ae5c26f24f Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl@sernet.de>
Date: Sat, 27 Oct 2007 14:20:09 +0200
Subject: [PATCH] Fix some warnings and errors
(This used to be commit e17d3e10e8)
2007-10-27 12:50:36 -07:00
Jeremy Allison
fc91aa6988 Move the horrible hack for link local addresses out of namequery.c
and into util_sock.c. is_ipaddress() now copes with link:local:v6%ifname
addresses, as does interpret_string_addr().
Jeremy
(This used to be commit a3f7db3d30)
2007-10-26 16:03:20 -07:00
Jeremy Allison
e054affb7b Fix bug in writing names into gencache
as well as 2 typos where AF_INET6 was mistypes as AF_INET.
JERRY YOU NEED THESE FIXES.
Fixes smbclient -L localhost -U%
Bugs reported by Kukks (thanks kukks).
Jeremy.
(This used to be commit f109f82622)
2007-10-25 19:07:25 -07:00
Jeremy Allison
6128d116b3 Fix resolve name to resolve IPv6 addresses of link-local%ifaddr
Jeremy.
(This used to be commit e6609cab73)
2007-10-25 18:28:36 -07:00
Jeremy Allison
34a8e1c51e Fix reversed bool check for access. Found by kukks.
Thanks !
Jeremy.
(This used to be commit a13e8bd39d)
2007-10-25 17:17:46 -07:00
Jeremy Allison
e6fcfdb54e Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit ec891be53c)
2007-10-25 16:22:40 -07:00
Jeremy Allison
d58398bd23 When doing reverse lookups actually look up the name, not
just the numeric address (doh!) :-).
Jeremy.
(This used to be commit 9aa9ecd8cc)
2007-10-25 16:14:52 -07:00
Jeremy Allison
1870643d20 Try and fix the Solaris build by adding a missing define
(from Jerry).
Jeremy
(This used to be commit a68bbea0d4)
2007-10-25 15:43:44 -07:00
metze
7c6ed7aa1c [libreplace] define AI_NUMERICSERV as it's used in getaddrinfo.c
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25728 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 11a977aa07)
2007-10-25 15:55:47 +02:00
metze
aae2ebab2d [libreplace] move and fix getaddrinfo configure checks
- move getaddrinfo check into getaddrinfo.m4
- add getaddrinfo.o to LIBREPLACEOBJ so that we really build the replacements

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25726 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit de01c503f4)
2007-10-25 15:55:19 +02:00
metze
899f921c72 - include getaddrinfo.h after we have defined struct addrinfo
- use rep_ instead of pg_ as prefix in getaddrinfo.[ch]
- define HAVE_<name> macros when we replace functions

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25724 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit e56977ea45)
2007-10-25 15:53:44 +02:00
metze
800ca51792 [libreplace] if we replace types define the HAVE_<type> macro
this is needed as heimdal's roken.h also tries to replace the types

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25718 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit b81d8bc43c)
2007-10-25 15:53:09 +02:00
metze
cd486165e9 [libreplace] move definition of struct addrinfo so that it can use socklen_t
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25715 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 4515007567)
2007-10-25 15:52:59 +02:00
metze
556513ff72 [libreplace] move define of a constant to near to the others
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25714 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit fa120f7c50)
2007-10-25 15:52:47 +02:00
metze
8cca849769 [libreplace] include socket_wrapper.h after we have typedef'ed socklen_t
metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25713 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit f1d434a132)
2007-10-25 15:51:51 +02:00
Jeremy Allison
325f3a0be2 We do support name lookups for host and service in our replacement
code - remove the restrictions from the original Postgres code.
Jeremy.
(This used to be commit bc9008aa1d)
2007-10-24 14:40:24 -07:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
(This used to be commit 98e154c312)
2007-10-24 14:16:54 -07:00
Jeremy Allison
e01cbcb28e Fix for AIX interface code from Kyle Stemen <kstemen@centeris.com>
Jeremy.
(This used to be commit 4d4ab9aeb9)
2007-10-24 12:44:38 -07:00
Gerald (Jerry) Carter
6a8dfad25c Fix compile error caused by unknown variable.
(This used to be commit dfef16ac43)
2007-10-21 13:44:29 -05:00
Gerald (Jerry) Carter
69c6f16e31 Correct VERSION and version.c to use SAMBA_VERSION_VENDOR_PATCH
which is used by mkversion.sh.
(This used to be commit a62c7f9350)
2007-10-21 12:32:06 -05:00
Gerald (Jerry) Carter
80b7bcb5fb Add test for "struct in6_addr" to the HAVE_IPV6 configure test.
Also make use of "if defined(HAVE_IPV6)" rather than testing for
AF_INET6 since this is not sufficient on HP-UX 11.11 to ensure
a working IPv6 implementation.
(This used to be commit 620785df4e)
2007-10-19 13:09:26 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Stefan Metzmacher
df50ee886f [libreplace] fix the standalone build of libreplace
all configure results which are used in replace.h
or any system/*.h should be in the in the libreplace
*.m4 files!

metze
(This used to be commit 1eefa0264b)
2007-10-18 10:54:37 +02:00
Jeremy Allison
bb126d1f49 Reformatting fix for new coding guidelines. BOOL ->bool.
Jeremy.
(This used to be commit 315215e20e)
2007-10-17 12:10:12 -07:00
Stefan Metzmacher
fa12678f4e delete empty file lib/replace/system/getaddrinfo.h
metze
(This used to be commit 354bdd38e8)
2007-10-17 15:21:48 +02:00
Jeremy Allison
2b2168bff6 Improve IPv4 detection.
Jeremy.
(This used to be commit 2ef50e325c)
2007-10-16 16:01:13 -07:00
Jeremy Allison
cadb72dd99 Move #defined for getaddrinfo into network.h (as other
defines). Allows RHEL4 compile to work.
Jeremy.
(This used to be commit 0ffdf4fdee)
2007-10-16 15:15:23 -07:00
Jeremy Allison
9125bcf77b Added in missing def for AI_ADDRCONFIG.
Jeremy.
(This used to be commit 3ef3c3afc3)
2007-10-16 12:22:58 -07:00
Jeremy Allison
ce77126e68 Fix access control code to be IPv6/v4 protocol independent.
Make unix_wild_match() talloc, not pstring based.
Next will be name resolution code, and client code.
Jeremy.
(This used to be commit f6a01b82c5)
2007-10-16 11:33:37 -07:00
Jeremy Allison
666f50b01f Move to protocol independent code in most of lib/util_sock.c
We don't use gethostbyname any more except in one case where
we're looking for host aliases (I don't know how to do that
with getaddrinfo yet). New function should be getaddrinfo().
Next step will be fixing lib/access.c, and then changing
libsmb/namequery.c to cope with IPv6 address returns.
Jeremy.
(This used to be commit 4a56b697b6)
2007-10-15 16:11:48 -07:00
Jeremy Allison
48cd61d30e Fix warning messages for unused variables.
Jeremy.
(This used to be commit 406737cd9a)
2007-10-15 15:52:30 -07:00
Stefan Metzmacher
c08cd08acc rename getsmbpass -> rep_getpass and provide the function prototype
metze
(This used to be commit 96820f8d8f)
2007-10-15 15:42:13 +02:00
Stefan Metzmacher
d5712f071a use "system/*.h" to get the system includes
metze
(This used to be commit d20c2fa274)
2007-10-15 15:41:06 +02:00
Stefan Metzmacher
c6a17c85e1 fix the compilation of getpass.c and it's configure test
metze
(This used to be commit f4c0961a16)
2007-10-15 13:20:41 +02:00
Jeremy Allison
a09bc48a1d r16320: Ensure variable is not null before calling fclose. Klocwork #412. Jeremy.
(This used to be commit 33ee0cfb19)
2007-10-15 13:20:41 +02:00
Jeremy Allison
335c35318a r16245: Cope with string being zero len. Klocwork bug #410. Jeremy.
(This used to be commit 46c12de07f)
2007-10-15 13:20:40 +02:00
jmcd
3c258755b5 Volker's fix for bug #668. Change the \n after the password prompt to go to tty instead of stdout.
(This used to be commit 0cd1ed0424)
2007-10-15 13:20:40 +02:00
Stefan Metzmacher
65f16c7fed reapply: Allow ^C to interrupt smbpasswd if using our getpass. from Jeremy
metze
(This used to be commit d4ae42b1b2)
2007-10-15 13:20:40 +02:00
Stefan Metzmacher
7fedf44eff reformat getpass() replacement code
metze
(This used to be commit 3e8f43e3cf)
2007-10-15 13:20:39 +02:00
Stefan Metzmacher
2ecbed36b2 missing stuff from samba4's libreplace
metze
(This used to be commit 0177158d85)
2007-10-15 13:19:28 +02:00
metze
804396dce9 don't imply "system/network.h" within replace.h,
as this brings in the socket_wrapper.h in unexpected
code and we endup with a missing 'swrap_close' while linking

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25602 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit ec8e3f7f92)
2007-10-15 13:19:28 +02:00
Volker Lendecke
c9165b99e9 Fix one more place for IFF_LOOPBACK
(This used to be commit add1294562)
2007-10-14 19:00:49 +02:00
Volker Lendecke
478ad87cb3 Use strlcpy instead of strncpy
(This used to be commit 5e95c54886)
2007-10-13 21:44:58 +02:00
Volker Lendecke
70b416a174 Fix an uninitialized variable warning
(This used to be commit d0f25bb89a)
2007-10-13 21:44:58 +02:00
Volker Lendecke
3d89bad41f Fix a segfault with an unknown interface
"interfaces = foo" with "foo" not being a known interface segfaulted for me.
(This used to be commit 556c33702c)
2007-10-13 21:44:58 +02:00
Volker Lendecke
e8b83d79b1 Also find loopback interfaces
Not sure if a loopback interface is actually a broadcast one.
(This used to be commit 76d8dedc36)
2007-10-13 21:44:58 +02:00
Jeremy Allison
6c8225445b Dummy formatting commit to check I've set up my home git
correctly.
(This used to be commit a1166e9e65)
2007-10-12 21:50:41 -07:00
Jeremy Allison
e9cf3a8ca2 Convert get_peer_addr() to IPv6. Only is_myname_or_ipaddr()
lefto to do then I can fix the lib/access.c functions.
Jeremy.
(This used to be commit 3403c6c330)
2007-10-12 13:38:04 -07:00
Stefan Metzmacher
9d29664b33 offsetof() is always present as shown in some
libreplace testing.

metze
(This used to be commit 4f084efd6a)
2007-10-12 10:06:27 +02:00
Jeremy Allison
f4fd12acc8 Try and fix segfault found by Guenther on Fedora. Fedora
seems to return bogus values for the interface entries on
vmnet and tun interfaces.
Jeremy.
(This used to be commit 12c0b1d828)
2007-10-11 18:03:12 -07:00
Jeremy Allison
cb5436bcc3 Add const to the get_peer_addr() and get_socket_addr()
calls. Use the IPv6 varient for get_peer_addr().
Jeremy.
(This used to be commit baf1f52e34)
2007-10-11 15:36:13 -07:00
Jeremy Allison
8e54530b52 Add start of IPv6 implementation. Currently most of this is avoiding
IPv6 in winbindd, but moves most of the socket functions that were
wrongly in lib/util.c into lib/util_sock.c and provides generic
IPv4/6 independent versions of most things. Still lots of work
to do, but now I can see how I'll fix the access check code.
Nasty part that remains is the name resolution code which is
used to returning arrays of in_addr structs.
Jeremy.
(This used to be commit 3f6bd0e1ec)
2007-10-10 18:25:16 -07:00
Jeremy Allison
0ec55a2462 Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into SAMBA_3_2_0
(This used to be commit 3f1ac564c0)
2007-10-10 17:56:55 -07:00
Jeremy Allison
81a70d4ac5 Merge from metze of libreplace header changes
(This used to be commit d39ce8e37e)
2007-10-10 17:56:19 -07:00
Guenther Deschner
f28dc0280d Display ace_objects in security descriptors.
Guenther
(This used to be commit 5fa3fc81b7)
2007-10-11 02:25:44 +02:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Jeremy Allison
a74c3385fc r25587: Fix getaddrinfo detection code. From Timur.
Jeremy.
(This used to be commit 3824a10fbc)
2007-10-10 12:31:16 -05:00
Günther Deschner
52ef68ad4b r25575: Document S-1-5-12 (restriced code sid).
Guenther
(This used to be commit 109b09edef)
2007-10-10 12:31:16 -05:00
Jeremy Allison
f7055aef17 r25565: Fix unintended consequence change for IPv6 noticed
by Volker. We used to return 0.0.0.0 for the text
address of an uninitialized socket - ensure we
still do so. Once uninitialized address is as
good as any other.
Jeremy.
(This used to be commit 2827bbe0f8)
2007-10-10 12:31:14 -05:00
Volker Lendecke
b5535567c1 r25564: Pass sharename to delete_share_security()
(This used to be commit d100bfffe2)
2007-10-10 12:31:13 -05:00
Volker Lendecke
f708132de7 r25561: Make use of [un]marshall_sec_desc
Minor cleanup only
(This used to be commit 4dc4364b68)
2007-10-10 12:31:13 -05:00
Jeremy Allison
d704cbdb41 r25560: Merge from Jelmer. "Define HAVE_* for other gai functions to prevent problems with libroken."
Jeremy.
(This used to be commit 3cd783e3a5)
2007-10-10 12:31:13 -05:00
Jelmer Vernooij
d154a0d74b r25557: merge libreplace fixes from samba4
(This used to be commit 8c1669997c)
2007-10-10 12:31:13 -05:00
Volker Lendecke
0ebab65706 r25534: Apply some const
Why? It moves these structs from the data into the text segment, so they
will never been copy-on-write copied. Not much, but as in German you say
"Kleinvieh macht auch Mist...."
(This used to be commit 0141e64ad4)
2007-10-10 12:31:12 -05:00
Jeremy Allison
3dbb3d4c26 r25510: Now we're returning the port instead of using a global,
remember to use ntohs. Hopefully will fix the build farm.
Jeremy.
(This used to be commit 5174acccb5)
2007-10-10 12:31:11 -05:00
Jeremy Allison
d75b175cf9 r25508: Reformatting.
Jeremy.
(This used to be commit b412ba6fb3)
2007-10-10 12:31:11 -05:00
Jeremy Allison
b5725f4fec r25507: Fix definition of struct sockaddr_storage if
struct sockaddr_in6 is defined.
Jeremy.
(This used to be commit 4cf17df5ca)
2007-10-10 12:31:11 -05:00
Jeremy Allison
941544a951 r25505: Add a replacement (IPv4 only) implementation of getaddrinfo/freeaddrinfo
under the 2 clause *BSD license for future use in IPv6 code. Original
code was from PostgreSQL and I've maintained their license even though
I've rewritten large parts of it (I probably should donate this back
to them).
Jeremy.
(This used to be commit 760d993340)
2007-10-10 12:31:10 -05:00
Jeremy Allison
30e4012396 r25495: Fixup definitions for missing sockaddr_storage.
Jeremy.
(This used to be commit d980ee5040)
2007-10-10 12:31:10 -05:00
Jeremy Allison
0d87820380 r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal with
the ripple effects this causes. utmp has to change etc. Remove some
global varables and store address/port in the unexpected db.
Jeremy.
(This used to be commit 18c6a2211d)
2007-10-10 12:31:09 -05:00
Jeremy Allison
334b288831 r25487: Try fix the build - fix socklen_t and sa_family_t.
Jeremy.
(This used to be commit 2cab825634)
2007-10-10 12:31:08 -05:00
Jeremy Allison
e817616a0e r25476: Finally fix up new interface detection code :-).
Jeremy.
(This used to be commit fffdad5285)
2007-10-10 12:31:07 -05:00
Jeremy Allison
989120d53e r25475: Fix braindead mistakes I made pointed out by Simo and
James (how did this compile ? :-).
Jeremy.
(This used to be commit ae8efc60aa)
2007-10-10 12:31:07 -05:00
Jeremy Allison
c7da0dced6 r25474: Try and fix the build on Mac OS X 10.4.9.
Shuffle sa_family_t around.
Jeremy.
(This used to be commit f1b8c5de0a)
2007-10-10 12:31:06 -05:00
Jeremy Allison
31adfe3446 r25473: Reformatting only. Prepare for new ip functions.
Jeremy.
(This used to be commit 2a8f3dd550)
2007-10-10 12:31:06 -05:00
Jeremy Allison
3fbd1ae54c r25472: Fix the interfaces code to detect IPv6 interfaces, using the
new standard getifaddrs() and freeifaddrs() interfaces. Currently
we only return IPv4 af_families. Needs fixing for binds to IPv6
but this has to be careful work.
Jeremy.
(This used to be commit 327875182c)
2007-10-10 12:31:06 -05:00
Jeremy Allison
a2bbf608d2 r25455: Ensure we have inet_ntop and inet_pton available in lib/replace.
Jeremy.
(This used to be commit 1f71990544)
2007-10-10 12:31:06 -05:00
Michael Adam
b6a6fbd493 r25434: Add the option to print the debug class (DBGC_CLASS) in the debug header.
Control this by a new boolean smb.conf option "debug class" which is
by default set to "no" to keep the default debug header unchanged.

Michael

Note: You need to make clean for this patch.
(This used to be commit 066a46ba91)
2007-10-10 12:31:05 -05:00
Michael Adam
9cffea618a r25424: Align log level (by two) in debugging output.
Michael
(This used to be commit 9265b3cde2)
2007-10-10 12:31:04 -05:00
Günther Deschner
6334c7cc5f r25417: Use DBGC_REGISTRY class.
Guenther
(This used to be commit 43ca04918a)
2007-10-10 12:31:04 -05:00
Günther Deschner
d3dd14b70e r25416: Add registry debug class.
Guenther
(This used to be commit b28dd747cb)
2007-10-10 12:31:03 -05:00
Günther Deschner
314cb03db1 r25396: Very obvious fix from Martin Zielinski.
Guenther
(This used to be commit 1f0d05807b)
2007-10-10 12:31:02 -05:00
Günther Deschner
f0653fd572 r25326: Free the context from the talloc_stackframe.
Guenther
(This used to be commit 0719835c4d)
2007-10-10 12:31:00 -05:00
Volker Lendecke
33fd077575 r25323: Fix the build
(This used to be commit e55b30ab84)
2007-10-10 12:30:59 -05:00