summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-06-14 02:06:58 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-06-14 02:06:58 +0000
commit0886638844b6ea5253cae217682c680cc7b6cec8 (patch)
treee4bae78ffbf3770fff68ee8a85fe9ac563b6dbc4 /source3/lib
parentbaef1358d2b5a98a592f0247911a31d79148dcba (diff)
downloadsamba-0886638844b6ea5253cae217682c680cc7b6cec8.tar.gz
samba-0886638844b6ea5253cae217682c680cc7b6cec8.tar.bz2
samba-0886638844b6ea5253cae217682c680cc7b6cec8.zip
Patch (from ctrlsoft <jelmer@nl.linux.org>) to poptify testparm, and the
modifications required to suppress the const warnings. Andrew Bartlett (This used to be commit ec4f1e9e2f6c162a475b424d63b9802387ad905e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/access.c18
-rw-r--r--source3/lib/debug.c4
2 files changed, 19 insertions, 3 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c
index 62d47b82cf..4e524735e4 100644
--- a/source3/lib/access.c
+++ b/source3/lib/access.c
@@ -188,7 +188,7 @@ static int list_match(char **list,char *item, int (*match_fn)(char *, char *))
/* return true if access should be allowed */
-BOOL allow_access(char **deny_list,char **allow_list,
+static BOOL allow_access_internal(char **deny_list,char **allow_list,
char *cname,char *caddr)
{
char *client[2];
@@ -240,6 +240,22 @@ BOOL allow_access(char **deny_list,char **allow_list,
return (True);
}
+/* return true if access should be allowed */
+BOOL allow_access(char **deny_list,char **allow_list,
+ const char *cname, const char *caddr)
+{
+ BOOL ret;
+
+ char *nc_cname = smb_xstrdup(cname);
+ char *nc_caddr = smb_xstrdup(caddr);
+
+ ret = allow_access_internal(deny_list, allow_list, nc_cname, nc_caddr);
+
+ SAFE_FREE(nc_cname);
+ SAFE_FREE(nc_caddr);
+ return ret;
+}
+
/* return true if the char* contains ip addrs only. Used to avoid
gethostbyaddr() calls */
static BOOL only_ipaddrs_in_list(char** list)
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 834c1b38f7..255b0568f1 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -516,7 +516,7 @@ void debug_init(void)
* get ready for syslog stuff
* ************************************************************************** **
*/
-void setup_logging(char *pname, BOOL interactive)
+void setup_logging(const char *pname, BOOL interactive)
{
debug_init();
@@ -531,7 +531,7 @@ void setup_logging(char *pname, BOOL interactive)
}
#ifdef WITH_SYSLOG
else {
- char *p = strrchr_m( pname,'/' );
+ const char *p = strrchr_m( pname,'/' );
if (p)
pname = p + 1;
#ifdef LOG_DAEMON