[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-130-g9f82a57
Jeremy Allison
jra at samba.org
Sat Oct 27 20:00:05 GMT 2007
The branch, v3-2-test has been updated
via 9f82a5766968dc72db5a86ad0afc71e8cffd5be0 (commit)
via e17d3e10e860c96b6d5208e5fe51e43b8e58c174 (commit)
from 83b3ecde1312092fd9875a2a8628652ffa6b6aca (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 9f82a5766968dc72db5a86ad0afc71e8cffd5be0
Author: Jeremy Allison <jra at samba.org>
Date: Sat Oct 27 12:51:38 2007 -0700
Fix zero_addr(&ip, INADDR_ANY); -> zero_addr(&ip, AF_INET)
from Volker's patch.
Jeremy.
commit e17d3e10e860c96b6d5208e5fe51e43b8e58c174
Author: Volker Lendecke <Volker.Lendecke at SerNet.DE>
Date: Sat Oct 27 21:15:07 2007 +0200
Two patches
Hi!
Can you check and push them?
Thanks,
Volker
From b488af5905e2dee12a1a72a3b40801ae5c26f24f Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at sernet.de>
Date: Sat, 27 Oct 2007 14:20:09 +0200
Subject: [PATCH] Fix some warnings and errors
-----------------------------------------------------------------------
Summary of changes:
source/Makefile.in | 5 +++--
source/client/smbmount.c | 10 +++++-----
source/client/smbumount.c | 2 +-
source/include/interfaces.h | 36 ++++++++++++++++++++++++++++++++++++
source/lib/interfaces.c | 4 ++--
source/lib/replace/getpass.c | 1 +
source/smbd/server.c | 2 +-
source/winbindd/idmap_ad.c | 2 +-
8 files changed, 50 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/Makefile.in b/source/Makefile.in
index a559d63..98fd8f8 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -269,11 +269,12 @@ TALLOC_OBJ = lib/talloc/talloc.o
LIB_WITHOUT_PROTO_OBJ = $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) $(TALLOC_OBJ) \
lib/messages.o librpc/gen_ndr/ndr_messaging.o lib/messages_local.o \
- lib/messages_ctdbd.o lib/packet.o lib/ctdbd_conn.o lib/talloc_stack.o
+ lib/messages_ctdbd.o lib/packet.o lib/ctdbd_conn.o lib/talloc_stack.o \
+ lib/interfaces.o
LIB_WITH_PROTO_OBJ = $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
lib/interface.o lib/md4.o \
- lib/interfaces.o lib/pidfile.o \
+ lib/pidfile.o \
lib/signal.o lib/system.o lib/sendfile.o lib/time.o \
lib/ufc.o lib/genrand.o lib/username.o \
lib/util_pw.o lib/access.o lib/smbrun.o \
diff --git a/source/client/smbmount.c b/source/client/smbmount.c
index 95adc9a..0c57c40 100644
--- a/source/client/smbmount.c
+++ b/source/client/smbmount.c
@@ -37,7 +37,7 @@ static pstring mpoint;
static pstring service;
static pstring options;
-static struct in_addr dest_ip;
+static struct sockaddr_storage dest_ip;
static bool have_ip;
static int smb_port = 0;
static bool got_user;
@@ -122,7 +122,7 @@ static struct cli_state *do_connection(char *the_service)
struct cli_state *c;
struct nmb_name called, calling;
char *server_n;
- struct in_addr ip;
+ struct sockaddr_storage ip;
pstring server;
char *share;
@@ -146,7 +146,7 @@ static struct cli_state *do_connection(char *the_service)
make_nmb_name(&called , server, 0x20);
again:
- zero_ip_v4(&ip);
+ zero_addr(&ip, AF_INET);
if (have_ip) ip = dest_ip;
/* have to open a new connection */
@@ -798,8 +798,8 @@ static void parse_mount_smb(int argc, char **argv)
} else if(!strcmp(opts, "debug")) {
DEBUGLEVEL = val;
} else if(!strcmp(opts, "ip")) {
- dest_ip = *interpret_addr2(opteq+1);
- if (is_zero_ip_v4(dest_ip)) {
+ if (!interpret_string_addr(&dest_ip, opteq+1,
+ 0)) {
fprintf(stderr,"Can't resolve address %s\n", opteq+1);
exit(1);
}
diff --git a/source/client/smbumount.c b/source/client/smbumount.c
index 4be54b6..1664e4b 100644
--- a/source/client/smbumount.c
+++ b/source/client/smbumount.c
@@ -80,7 +80,7 @@ umount_ok(const char *mount_point)
static char *
canonicalize (char *path)
{
- char *canonical = malloc (PATH_MAX + 1);
+ char *canonical = (char*)malloc (PATH_MAX + 1);
if (!canonical) {
fprintf(stderr, "Error! Not enough memory!\n");
diff --git a/source/include/interfaces.h b/source/include/interfaces.h
index 66ea151..b9d9000 100644
--- a/source/include/interfaces.h
+++ b/source/include/interfaces.h
@@ -1,8 +1,31 @@
/*
+ Unix SMB/CIFS implementation.
+ Machine customisation and include handling
+ Copyright (C) Jeremy Allison <jra at samba.org> 2007
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/*
This structure is used by lib/interfaces.c to return the list of network
interfaces on the machine
*/
+#ifndef _INTERFACES_H
+#define _INTERFACES_H
+
+#include "lib/replace/replace.h"
+
#define MAX_INTERFACES 128
struct iface_struct {
@@ -12,3 +35,16 @@ struct iface_struct {
struct sockaddr_storage netmask;
struct sockaddr_storage bcast;
};
+
+bool make_netmask(struct sockaddr_storage *pss_out,
+ const struct sockaddr_storage *pss_in,
+ unsigned long masklen);
+void make_bcast(struct sockaddr_storage *pss_out,
+ const struct sockaddr_storage *pss_in,
+ const struct sockaddr_storage *nmask);
+void make_net(struct sockaddr_storage *pss_out,
+ const struct sockaddr_storage *pss_in,
+ const struct sockaddr_storage *nmask);
+int get_interfaces(struct iface_struct *ifaces, int max_interfaces);
+
+#endif
diff --git a/source/lib/interfaces.c b/source/lib/interfaces.c
index 48fe249..38abb92 100644
--- a/source/lib/interfaces.c
+++ b/source/lib/interfaces.c
@@ -140,7 +140,7 @@ bool make_netmask(struct sockaddr_storage *pss_out,
static void make_bcast_or_net(struct sockaddr_storage *pss_out,
const struct sockaddr_storage *pss_in,
const struct sockaddr_storage *nmask,
- bool make_bcast)
+ bool make_bcast_p)
{
unsigned int i = 0, len = 0;
char *pmask = NULL;
@@ -162,7 +162,7 @@ static void make_bcast_or_net(struct sockaddr_storage *pss_out,
}
for (i = 0; i < len; i++, p++, pmask++) {
- if (make_bcast) {
+ if (make_bcast_p) {
*p = (*p & *pmask) | (*pmask ^ 0xff);
} else {
/* make_net */
diff --git a/source/lib/replace/getpass.c b/source/lib/replace/getpass.c
index 1d13461..d91d029 100644
--- a/source/lib/replace/getpass.c
+++ b/source/lib/replace/getpass.c
@@ -21,6 +21,7 @@ not, see <http://www.gnu.org/licenses/>. */
#include "system/filesys.h"
#include "system/wait.h"
#include "system/terminal.h"
+#include "system/passwd.h"
/*
* Define additional missing types
diff --git a/source/smbd/server.c b/source/smbd/server.c
index abad0ef..bcf997f 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -369,7 +369,7 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_
open_socket_in(SOCK_STREAM, port, 0,
ifss, True);
if(s == -1) {
- return false;
+ continue;
}
/* ready to listen */
diff --git a/source/winbindd/idmap_ad.c b/source/winbindd/idmap_ad.c
index 0d190eb..50f7914 100644
--- a/source/winbindd/idmap_ad.c
+++ b/source/winbindd/idmap_ad.c
@@ -60,7 +60,7 @@ static ADS_STRUCT *ad_idmap_cached_connection_internal(void)
ADS_STATUS status;
bool local = False;
fstring dc_name;
- struct in_addr dc_ip;
+ struct sockaddr_storage dc_ip;
if (ad_idmap_ads != NULL) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list