The branch, v3-2-test has been updated via 8dad80b4719691d66827ed46bebb963c0f8ba568 (commit) via 0abc8863f87fe5d2473492797c010784cb086008 (commit) from 5f2b3145fcaeee58f285b6527e9fac09c5337e8a (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log ----------------------------------------------------------------- commit 8dad80b4719691d66827ed46bebb963c0f8ba568 Author: Michael Adam <[EMAIL PROTECTED]> Date: Thu Mar 13 23:08:07 2008 +0100 Allow parameter "include" in registry based configuration (again). This is for instance important to allow includes with %I to setup individual logging (e.g.) for certain clients. Michael commit 0abc8863f87fe5d2473492797c010784cb086008 Author: Michael Adam <[EMAIL PROTECTED]> Date: Thu Mar 13 23:02:58 2008 +0100 Fix %I macro expansion for IPv4 mapped IPv6 addresses. On some systems (linux e.g.), when listening on ipv6 and ipv4, addresses of ipv4 clients are printed as mapped ipv4 addresses by getnameinfo (e.g. ::ffff:127.0.0.1). This re-establishes the original behaviour of %I to expand to the plain ipv4 address for an ipv4 client. Michael ----------------------------------------------------------------------- Summary of changes: source/lib/substitute.c | 10 ++++++++-- source/lib/util_reg.c | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/substitute.c b/source/lib/substitute.c index 59b54c4..ce97a36 100644 --- a/source/lib/substitute.c +++ b/source/lib/substitute.c @@ -597,10 +597,16 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name, } a_string = realloc_string_sub(a_string, "%D", r); break; - case 'I' : + case 'I' : { + int offset = 0; + client_addr(get_client_fd(), addr, sizeof(addr)); + if (strnequal(addr,"::ffff:",7)) { + offset = 7; + } a_string = realloc_string_sub(a_string, "%I", - client_addr(get_client_fd(),addr, sizeof(addr))); + addr + offset); break; + } case 'i': a_string = realloc_string_sub( a_string, "%i", client_socket_addr(get_client_fd(), addr, sizeof(addr)) ); diff --git a/source/lib/util_reg.c b/source/lib/util_reg.c index 2475dca..a2a6297 100644 --- a/source/lib/util_reg.c +++ b/source/lib/util_reg.c @@ -127,7 +127,6 @@ bool registry_smbconf_valname_forbidden(const char *valname) { /* hard code the list of forbidden names here for now */ const char *forbidden_valnames[] = { - "include", "lock directory", "lock dir", "config backend", -- Samba Shared Repository