summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
commit5209a846a9157e649fcdcb561f7eaf19c8c0e465 (patch)
treeb0a7e52b5646c8eec182dbc391e7934b6804488c /source3/web
parent625359b2e266105022309df8985720108ecd6f67 (diff)
parent2ee8d29d22bcb1c350ab59d71b0aee548489bc9c (diff)
downloadsamba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.gz
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.bz2
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrv
Conflicts: source4/lib/registry/ldb.c source4/rpc_server/winreg/rpc_winreg.c
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/cgi.c7
-rw-r--r--source3/web/statuspage.c5
-rw-r--r--source3/web/swat.c7
3 files changed, 11 insertions, 8 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 070e80cf91..ce36bd9310 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -451,7 +451,7 @@ static void cgi_download(char *file)
if (S_ISDIR(st.st_mode))
{
snprintf(buf, sizeof(buf), "%s/index.html", file);
- if (!file_exist(buf, &st) || !S_ISREG(st.st_mode))
+ if (!file_exist_stat(buf, &st) || !S_ISREG(st.st_mode))
{
cgi_setup_error("404 File Not Found","",
"The requested file was not found");
@@ -488,7 +488,8 @@ static void cgi_download(char *file)
printf("Content-Type: text/html\r\n");
}
}
- printf("Expires: %s\r\n", http_timestring(time(NULL)+EXPIRY_TIME));
+ printf("Expires: %s\r\n",
+ http_timestring(talloc_tos(), time(NULL)+EXPIRY_TIME));
lang = lang_tdb_current();
if (lang) {
@@ -604,7 +605,7 @@ void cgi_setup(const char *rootdir, int auth_required)
}
printf("HTTP/1.0 200 OK\r\nConnection: close\r\n");
- printf("Date: %s\r\n", http_timestring(time(NULL)));
+ printf("Date: %s\r\n", http_timestring(talloc_tos(), time(NULL)));
baseurl = "";
pathinfo = url+1;
}
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index ce24c7cddd..e684a075c2 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -43,9 +43,10 @@ static void initPid2Machine (void)
{
/* show machine name rather PID on table "Open Files"? */
if (PID_or_Machine) {
- PIDMAP *p;
+ PIDMAP *p, *next;
- for (p = pidmap; p != NULL; ) {
+ for (p = pidmap; p != NULL; p = next) {
+ next = p->next;
DLIST_REMOVE(pidmap, p);
SAFE_FREE(p->machine);
SAFE_FREE(p);
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 1502c5bc2f..27c4b54e2f 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -384,7 +384,8 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte
break;
case P_LIST:
- if (!str_list_compare(*(char ***)ptr, (char **)(parm->def.lvalue))) continue;
+ if (!str_list_equal(*(const char ***)ptr,
+ (const char **)(parm->def.lvalue))) continue;
break;
case P_STRING:
@@ -595,7 +596,7 @@ static void ViewModeBoxes(int mode)
****************************************************************************/
static void welcome_page(void)
{
- if (file_exist("help/welcome.html", NULL)) {
+ if (file_exist("help/welcome.html")) {
include_html("help/welcome.html");
} else {
include_html("help/welcome-no-samba-doc.html");
@@ -1439,7 +1440,7 @@ const char *lang_msg_rotate(TALLOC_CTX *ctx, const char *msgid)
cgi_load_variables();
- if (!file_exist(get_dyn_CONFIGFILE(), NULL)) {
+ if (!file_exist(get_dyn_CONFIGFILE())) {
have_read_access = True;
have_write_access = True;
} else {