diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-11-28 03:58:46 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-11-28 03:58:46 +0000 |
commit | b63ad0882a16a5d28003e57f2b0b81dee3fb322b (patch) | |
tree | 0a343ce219e2b8b38a5d702d66032c57b83d9720 /net/khttpd | |
parent | a9d7bff9a84dba79609a0002e5321b74c4d64c64 (diff) |
Merge with 2.4.0-test11.
Diffstat (limited to 'net/khttpd')
-rw-r--r-- | net/khttpd/README | 11 | ||||
-rw-r--r-- | net/khttpd/datasending.c | 6 | ||||
-rw-r--r-- | net/khttpd/main.c | 9 |
3 files changed, 5 insertions, 21 deletions
diff --git a/net/khttpd/README b/net/khttpd/README index 57d974051..84ccd6575 100644 --- a/net/khttpd/README +++ b/net/khttpd/README @@ -117,17 +117,6 @@ echo 1 > /proc/sys/net/khttpd/start Port 8080 - in /etc/apache/httpd.conf. For security-reasons, you can also change - - BindAddress * - - to - - BindAddress 127.0.0.1 - - (in the same file) to prevent outside users from accessing Apache - directly. - Stopping kHTTPd diff --git a/net/khttpd/datasending.c b/net/khttpd/datasending.c index a26afe191..5726dca32 100644 --- a/net/khttpd/datasending.c +++ b/net/khttpd/datasending.c @@ -58,7 +58,7 @@ It sends the data to the socket indicated by desc->buf. static int sock_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size) { int written; - unsigned long kaddr; + char *kaddr; unsigned long count = desc->count; struct socket *sock = (struct socket *) desc->buf; mm_segment_t old_fs; @@ -69,7 +69,7 @@ static int sock_send_actor(read_descriptor_t * desc, struct page *page, unsigned set_fs(KERNEL_DS); kaddr = kmap(page); - written = SendBuffer_async(sock,(char *)kaddr + offset,size); + written = SendBuffer_async(sock, kaddr + offset, size); kunmap(page); set_fs(old_fs); if (written < 0) { @@ -114,7 +114,7 @@ int DataSending(const int CPUNR) inode = CurrentRequest->filp->f_dentry->d_inode; - if (inode && inode->i_mapping->a_ops->readpage) { + if (inode->i_mapping->a_ops->readpage) { /* This does the actual transfer using sendfile */ read_descriptor_t desc; loff_t *ppos; diff --git a/net/khttpd/main.c b/net/khttpd/main.c index 5c39c59b9..2ade82be2 100644 --- a/net/khttpd/main.c +++ b/net/khttpd/main.c @@ -101,15 +101,12 @@ static int MainDaemon(void *cpu_pointer) MOD_INC_USE_COUNT; - current->state |= TASK_EXCLUSIVE; - CPUNR=0; if (cpu_pointer!=NULL) CPUNR=(int)*(int*)cpu_pointer; sprintf(current->comm,"khttpd - %i",CPUNR); - lock_kernel(); /* This seems to be required for exit_mm */ - exit_mm(current); + daemonize(); init_waitqueue_head(&(DummyWQ[CPUNR])); @@ -148,7 +145,6 @@ static int MainDaemon(void *cpu_pointer) changes +=AcceptConnections(CPUNR,MainSocket); } - set_current_state(TASK_INTERRUPTIBLE|TASK_EXCLUSIVE); if (changes==0) { (void)interruptible_sleep_on_timeout(&(DummyWQ[CPUNR]),1); @@ -200,8 +196,7 @@ static int ManagementDaemon(void *unused) sprintf(current->comm,"khttpd manager"); - lock_kernel(); /* This seems to be required for exit_mm */ - exit_mm(current); + daemonize(); /* Block all signals except SIGKILL and SIGSTOP */ |