Re: Problem installing apache webserver on my FreeRunner

2009-03-01 Thread HouYu Li
You can try build thttpd with openmoko toolchain..

On Mon, Mar 2, 2009 at 10:51 AM, Nelson Castillo wrote:

> On Mon, Mar 2, 2009 at 10:42 AM, Stefan Monnier
>  wrote:
> >>  I just got my new FR fone as a part of my university research program
> >>  and tried installing apache2 but it does not install.It returns error
> >>  status 2.
> >
> >> Can you guys suggest how i can go ahead. I am using OM 2008.12. I tried
> >> opkg install apache2
> >
> > FWIW, maybe you'd be better served by installing Debian since you then
> > have a larger collection of standard packages.
>
> I've had good luck with the Cherokee webserver on the ARM (Cherokee + PHP).
>
> http://packages.debian.org/search?keywords=cherokee
>
> I've used it with Openembedded also. I remember we even had a custom
> recipe for the latest version (available 1 1/2 years ago) but it
> wasn't in shape to be contributed back.
>
> ___
> Openmoko community mailing list
> community@lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>



-- 
Best Regards

HouYu Li, Karajan

karajan_ii (at) hotmail.com
karadog (at) gmail.com
lihouyu (at) phpex.net

PHP Programmer
Red Hat Certified Engineer

Shanghai, China
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-03-01 Thread Nelson Castillo
On Mon, Mar 2, 2009 at 10:42 AM, Stefan Monnier
 wrote:
>>  I just got my new FR fone as a part of my university research program
>>  and tried installing apache2 but it does not install.It returns error
>>  status 2.
>
>> Can you guys suggest how i can go ahead. I am using OM 2008.12. I tried
>> opkg install apache2
>
> FWIW, maybe you'd be better served by installing Debian since you then
> have a larger collection of standard packages.

I've had good luck with the Cherokee webserver on the ARM (Cherokee + PHP).

http://packages.debian.org/search?keywords=cherokee

I've used it with Openembedded also. I remember we even had a custom
recipe for the latest version (available 1 1/2 years ago) but it
wasn't in shape to be contributed back.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-03-01 Thread Stefan Monnier
>  I just got my new FR fone as a part of my university research program
>  and tried installing apache2 but it does not install.It returns error
>  status 2.

> Can you guys suggest how i can go ahead. I am using OM 2008.12. I tried
> opkg install apache2

FWIW, maybe you'd be better served by installing Debian since you then
have a larger collection of standard packages.


Stefan


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-03-01 Thread Timo Juhani Lindfors
Aapo Rantalainen  writes:
> I eliminate warnings and memory leaks. (can be compiled -Wall -Wextra cleanly)
> I use valgrind to find memory leaks, and it founds something with
> threading. I read manuals and found this solution, but valgrind is not
> satisfated.

Also things like

safe_malloc(1000*sizeof(char));

all around the code sound very suspious and potentially eat a lot of
memory.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-03-01 Thread Aapo Rantalainen
http://cc.oulu.fi/~rantalai/freerunner/aa-http/
Thanks Timo for your thoughts.

Case:
User Adam start server on directory, where Bob has write access. (this
is bad habits anyway)
Someone asks file from server. Server first check file size and then
loads it. Bob can change file between
those steps and it causes buffer overflow. (and if Adam is root, this
is critical)



I eliminate warnings and memory leaks. (can be compiled -Wall -Wextra cleanly)
I use valgrind to find memory leaks, and it founds something with
threading. I read manuals and found this solution, but valgrind is not
satisfated.

//  I try that every thread frees its memory when it is ready:
   pthread_attr_t pattr;
   pthread_attr_init(&pattr);
   pthread_attr_setdetachstate(&pattr, PTHREAD_CREATE_DETACHED);


pthread_create(&handling_thread, &pattr, handle_connection, (void
*)new_conection_socket);


-Aapo Rantalainen

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-02-28 Thread Timo Juhani Lindfors
Aapo Rantalainen  writes:
> (and let me know, if you find something)

I think I found a vulnerability that results in local execution of
code as root if local user is allowed to write to the directory that
serves the web pages.

page_from_file checks the file size first, then allocates a buffer and
starts copying data. If the size of the file changes between these
steps aa-http will overflow the buffer.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-02-28 Thread sandilya b
I need it to host a couple of pages which contains the phone information and 
some dynamic content so that when people connect to my webpage they can get my 
information.


--- On Sat, 2/28/09, Aapo Rantalainen  wrote:

> From: Aapo Rantalainen 
> Subject: Re: Problem installing apache webserver on my FreeRunner
> To: community@lists.openmoko.org
> Date: Saturday, February 28, 2009, 8:31 AM
> Hi, you didn't say why you need Apache (what features
> are needed). So
> I introduce my simple http-server.
> http://cc.oulu.fi/~rantalai/freerunner/aa-http/
> 
> *It can serve (at least) html/txt/png/pdf files.
> *Easy way to handle dynamic content or make http-based
> 'control-center'.
>Go page named vibra.html and your device should thrill 2
> seconds.
> *Not implemented: directory listing.
> 
> It is not very well tested, so if you need privacy take a
> serious look
> on the code.
> (and let me know, if you find something)
> 
> -Aapo Rantalainen
> 
> ___
> Openmoko community mailing list
> community@lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community


  


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-02-28 Thread Timo Juhani Lindfors
Aapo Rantalainen  writes:
> It is not very well tested, so if you need privacy take a serious look
> on the code.
> (and let me know, if you find something)

gcc 4.1.2:

helpers.c:7: warning: incompatible implicit declaration of built-in function 
'strrchr'
helpers.c: At top level:
helpers.c:82: error: expected declaration specifiers or '...' before 'size_t'
helpers.c: In function 'strencode':
helpers.c:86: error: 'tosize' undeclared (first use in this function)
helpers.c:86: error: (Each undeclared identifier is reported only once
helpers.c:86: error: for each function it appears in.)
helpers.c:88: warning: incompatible implicit declaration of built-in function 
'strchr'
helpers.c:96: warning: incompatible implicit declaration of built-in function 
'sprintf'

saturn static analysis tool:

server.c:114:orange:Inconsistency error
server.c:114: Possible null dereference of variable page+count. This variable 
is checked for Null at lines: 106
server.c:106: checked for null


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-02-28 Thread Aapo Rantalainen
Hi, you didn't say why you need Apache (what features are needed). So
I introduce my simple http-server.
http://cc.oulu.fi/~rantalai/freerunner/aa-http/

*It can serve (at least) html/txt/png/pdf files.
*Easy way to handle dynamic content or make http-based 'control-center'.
   Go page named vibra.html and your device should thrill 2 seconds.
*Not implemented: directory listing.

It is not very well tested, so if you need privacy take a serious look
on the code.
(and let me know, if you find something)

-Aapo Rantalainen

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Problem installing apache webserver on my FreeRunner

2009-02-28 Thread Risto H. Kurppa
On Sat, Feb 28, 2009 at 8:44 AM, sandilya b  wrote:
> Hi All,
>
>  I just got my new FR fone as a part of my university research program and 
> tried installing apache2 but it does not install.It returns error status 2.
>
> Can you guys suggest how i can go ahead. I am using OM 2008.12. I tried
> opkg install apache2
>
> -Sandy
>

apache isn't available in the default repositories, someone will soon
point you to a place where to find ot or to a smaller server to
install to openmoko..


r


-- 
| risto h. kurppa
| risto at kurppa dot fi
| http://risto.kurppa.fi

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Problem installing apache webserver on my FreeRunner

2009-02-27 Thread sandilya b
Hi All,
 
 I just got my new FR fone as a part of my university research program and 
tried installing apache2 but it does not install.It returns error status 2.

Can you guys suggest how i can go ahead. I am using OM 2008.12. I tried
opkg install apache2

-Sandy






  

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community