[SCM] Samba Shared Repository - branch v3-6-test updated
Volker Lendecke
vlendec at samba.org
Wed Mar 2 04:41:35 MST 2011
The branch, v3-6-test has been updated
via e3ac2af s3: Attempt to fix the build on IRIX
via 08f0055 s3: GPFS can't deal with mangled names
from 529291b s3-printing: vfs_connect prior to driver/dfs IO
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit e3ac2af0da93075a65a6ef703183615e663a6e7a
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 2 10:44:14 2011 +0100
s3: Attempt to fix the build on IRIX
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Wed Mar 2 11:33:05 CET 2011 on sn-devel-104
(cherry picked from commit 8635a3834a50b911aab549ddb5a41952a84dccc3)
commit 08f0055279b77602ed2c8a3ad3e852d475fbacc2
Author: Volker Lendecke <vl at samba.org>
Date: Thu Feb 24 02:50:46 2011 -0700
s3: GPFS can't deal with mangled names
In getrealfilename, avoid calling the GPFS function
(cherry picked from commit 358f031ccf7e5df11416b977965dfbb184e2bd25)
-----------------------------------------------------------------------
Summary of changes:
nsswitch/wins.c | 65 +++++++-------------------------------------
source3/modules/vfs_gpfs.c | 7 +++++
2 files changed, 17 insertions(+), 55 deletions(-)
Changeset truncated at 500 lines:
diff --git a/nsswitch/wins.c b/nsswitch/wins.c
index eba27bc..5a1d8e7 100644
--- a/nsswitch/wins.c
+++ b/nsswitch/wins.c
@@ -114,72 +114,27 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
#ifdef HAVE_NS_API_H
-/* Use our own create socket code so we don't recurse.... */
-
-static int wins_lookup_open_socket_in(void)
-{
- struct sockaddr_in sock;
- int val=1;
- int res;
-
- memset((char *)&sock,'\0',sizeof(sock));
-
-#ifdef HAVE_SOCK_SIN_LEN
- sock.sin_len = sizeof(sock);
-#endif
- sock.sin_port = 0;
- sock.sin_family = AF_INET;
- sock.sin_addr.s_addr = interpret_addr("0.0.0.0");
- res = socket(AF_INET, SOCK_DGRAM, 0);
- if (res == -1)
- return -1;
-
- if (setsockopt(res,SOL_SOCKET,SO_REUSEADDR,(char *)&val,sizeof(val)) != 0) {
- close(res);
- return -1;
- }
-#ifdef SO_REUSEPORT
- if (setsockopt(res,SOL_SOCKET,SO_REUSEPORT,(char *)&val,sizeof(val)) != 0) {
- close(res);
- return -1;
- }
-#endif /* SO_REUSEPORT */
-
- /* now we've got a socket - we need to bind it */
-
- if (bind(res, (struct sockaddr * ) &sock,sizeof(sock)) < 0) {
- close(res);
- return(-1);
- }
-
- set_socket_options(res,"SO_BROADCAST");
-
- return res;
-}
-
static struct node_status *lookup_byaddr_backend(char *addr, int *count)
{
- int fd;
struct sockaddr_storage ss;
struct nmb_name nname;
- struct node_status *status;
+ struct node_status *result;
+ NTSTATUS status;
if (!initialised) {
nss_wins_init();
}
- fd = wins_lookup_open_socket_in();
- if (fd == -1)
- return NULL;
-
make_nmb_name(&nname, "*", 0);
if (!interpret_string_addr(&ss, addr, AI_NUMERICHOST)) {
return NULL;
}
- status = node_status_query(fd, &nname, &ss, count, NULL);
+ status = node_status_query(NULL, &nname, &ss, &result, count, NULL);
+ if (!NT_STATUS_IS_OK(status)) {
+ return NULL;
+ }
- close(fd);
- return status;
+ return result;
}
/* IRIX version */
@@ -229,7 +184,7 @@ int lookup(nsd_file_t *rq)
if ( status = lookup_byaddr_backend(key, &count)) {
size = strlen(key) + 1;
if (size > len) {
- free(status);
+ talloc_free(status);
return NSD_ERROR;
}
len -= size;
@@ -241,7 +196,7 @@ int lookup(nsd_file_t *rq)
if (status[i].type == 0x20) {
size = sizeof(status[i].name) + 1;
if (size > len) {
- free(status);
+ talloc_free(status);
return NSD_ERROR;
}
len -= size;
@@ -251,7 +206,7 @@ int lookup(nsd_file_t *rq)
}
}
response[strlen(response)-1] = '\n';
- free(status);
+ talloc_free(status);
}
} else if (StrCaseCmp(map,"hosts.byname") == 0) {
if (ip_list = lookup_byname_backend(key, &count)) {
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 7e7ee34..d36cdbe 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -117,6 +117,13 @@ static int vfs_gpfs_get_real_filename(struct vfs_handle_struct *handle,
char *full_path;
char real_pathname[PATH_MAX+1];
int buflen;
+ bool mangled;
+
+ mangled = mangle_is_mangled(name, handle->conn->params);
+ if (mangled) {
+ return SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name,
+ mem_ctx, found_name);
+ }
full_path = talloc_asprintf(talloc_tos(), "%s/%s", path, name);
if (full_path == NULL) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list