summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-07-08 04:51:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:18 -0500
commitaf8a691db11a5072865f8b03fd1cbd3aab5cb6d7 (patch)
tree0779dd2d2c6d9ea3eae0f094803f6ba3b3c56f24 /source3/web
parent22268d79265d79b8d86d1152a7bfe2ebc8988905 (diff)
downloadsamba-af8a691db11a5072865f8b03fd1cbd3aab5cb6d7.tar.gz
samba-af8a691db11a5072865f8b03fd1cbd3aab5cb6d7.tar.bz2
samba-af8a691db11a5072865f8b03fd1cbd3aab5cb6d7.zip
r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy. (This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb)
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/cgi.c4
-rw-r--r--source3/web/statuspage.c15
2 files changed, 14 insertions, 5 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 5d52ad6279..6c9cfce13c 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -457,6 +457,10 @@ static void cgi_download(char *file)
printf("Content-Type: image/gif\r\n");
} else if (strcmp(p,".jpg")==0) {
printf("Content-Type: image/jpeg\r\n");
+ } else if (strcmp(p,".png")==0) {
+ printf("Content-Type: image/png\r\n");
+ } else if (strcmp(p,".css")==0) {
+ printf("Content-Type: text/css\r\n");
} else if (strcmp(p,".txt")==0) {
printf("Content-Type: text/plain\r\n");
} else {
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index 57b5d0f7b7..871e07b5d0 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -108,23 +108,28 @@ static char *tstring(time_t t)
static void print_share_mode(share_mode_entry *e, char *fname)
{
char *utf8_fname;
+ int deny_mode = map_share_mode_to_deny_mode(e->share_access,
+ e->private_options);
printf("<tr><td>%s</td>",_(mapPid2Machine(e->pid)));
printf("<td>");
- switch ((e->share_mode>>4)&0xF) {
+ switch ((deny_mode>>4)&0xF) {
case DENY_NONE: printf("DENY_NONE"); break;
case DENY_ALL: printf("DENY_ALL "); break;
case DENY_DOS: printf("DENY_DOS "); break;
+ case DENY_FCB: printf("DENY_FCB "); break;
case DENY_READ: printf("DENY_READ "); break;
case DENY_WRITE:printf("DENY_WRITE "); break;
}
printf("</td>");
printf("<td>");
- switch (e->share_mode&0xF) {
- case 0: printf("%s", _("RDONLY ")); break;
- case 1: printf("%s", _("WRONLY ")); break;
- case 2: printf("%s", _("RDWR ")); break;
+ if (e->access_mask & (FILE_READ_DATA|FILE_WRITE_DATA)) {
+ printf("%s", _("RDWR "));
+ } else if (e->access_mask & FILE_WRITE_DATA) {
+ printf("%s", _("WRONLY "));
+ } else {
+ printf("%s", _("RDONLY "));
}
printf("</td>");