The branch, master has been updated
       via  8635a38 s3: Attempt to fix the build on IRIX
       via  358f031 s3: GPFS can't deal with mangled names
      from  8870fcb build: fixed the ELF name for private libraries

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8635a3834a50b911aab549ddb5a41952a84dccc3
Author: Volker Lendecke <[email protected]>
Date:   Wed Mar 2 10:44:14 2011 +0100

    s3: Attempt to fix the build on IRIX
    
    Autobuild-User: Volker Lendecke <[email protected]>
    Autobuild-Date: Wed Mar  2 11:33:05 CET 2011 on sn-devel-104

commit 358f031ccf7e5df11416b977965dfbb184e2bd25
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 24 02:50:46 2011 -0700

    s3: GPFS can't deal with mangled names
    
    In getrealfilename, avoid calling the GPFS function

-----------------------------------------------------------------------

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 5136c94..e0aa2ad 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

Reply via email to