You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Morris <bm...@memetic.com> on 1997/07/28 02:51:45 UTC

[PATCH] http_main.c compile warning

I dont know if this is still a problem since I am having trouble
updating my local repository. What is the "right" way to
update a local repository from the CVS snapshots?

-bill

gcc -c   -O2 -DSOLARIS2=250   http_main.c
http_main.c: In function `sock_bind':
http_main.c:1864: warning: passing arg 2 of `bind' discards `const' from
pointer target type


Index: apache/src/http_main.c
===================================================================
RCS file: /export/home/cvs/apache/apache/src/http_main.c,v
retrieving revision 1.187
diff -c -r1.187 http_main.c
*** /tmp/T0a001G5	Sun Jul 27 20:04:52 1997
--- http_main.c	Sun Jul 27 19:59:09 1997
***************
*** 1861,1867 ****
  /* MPE requires CAP=PM and GETPRIVMODE to bind to ports less than 1024
*/
      if (ntohs(server->sin_port) < 1024) GETPRIVMODE();
  #endif
!     if(bind(s, (const struct sockaddr *)server,sizeof(struct
sockaddr_in)) == -1)
      {
          perror("bind");
  #ifdef MPE
--- 1861,1867 ----
  /* MPE requires CAP=PM and GETPRIVMODE to bind to ports less than 1024
*/
      if (ntohs(server->sin_port) < 1024) GETPRIVMODE();
  #endif
!     if(bind(s, (struct sockaddr *)server,sizeof(struct sockaddr_in))
== -1)
      {
          perror("bind");
  #ifdef MPE

Re: anonymous CVS access

Posted by Rob Hartill <ro...@imdb.com>.
On Mon, 28 Jul 1997, Brian Behlendorf wrote:

> 
> Rather than burn a lot of folks' time trying to get CVSup to work on BSDI
> or getting pserver to have any sense of security, I'll work on moving
> Hyperreal to FreeBSD.  Though, it's not going to be easy, there's *lots* of
> legacy around here.  In the long run it'll probably be the best thing.
> 
> Anyone have any pointers or tips on converting from one to the other?
> Email me privately.... I suppose I can go snoop on the freebsd newsgroups.

Might it be better to club together to buy a new box for apache.org ?
Having a machine dedicated to apache needs sure beats sharing with
the hyperreal folks. If we can't get some big corp to donate the kit
then I'd be willing to share in the cost.

cvsup is great but suffers from not having an application that makes
non-FreeBSD hackers rush out and port it. I've said it before.. Apache
could be that catalyst.


--
Rob Hartill                              Internet Movie Database (Ltd)
http://www.moviedatabase.com/   .. a site for sore eyes.


Re: anonymous CVS access

Posted by Brian Behlendorf <br...@organic.com>.
Rather than burn a lot of folks' time trying to get CVSup to work on BSDI
or getting pserver to have any sense of security, I'll work on moving
Hyperreal to FreeBSD.  Though, it's not going to be easy, there's *lots* of
legacy around here.  In the long run it'll probably be the best thing.

Anyone have any pointers or tips on converting from one to the other?
Email me privately.... I suppose I can go snoop on the freebsd newsgroups.

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"Why not?" - TL           brian@organic.com - hyperreal.org - apache.org

Re: [PATCH] http_main.c compile warning

Posted by Dean Gaudet <dg...@arctic.org>.
If I thought we could reasonably replicate the cvs repository I'd just
start running cvsup on twinlark ... but I don't want to haul down 4Mb of
stuff every couple hours just to get the entire repository...

Um I guess I could use a gnutar incremental and avoid
/export/home/cvs/CVSROOT entirely so that I don't get the log files... 
yeah this wouldn't be too hard.  I'm still hauling more data than
necessary ... but not as bad as hauling the entire repository. 

Ok I'll do this.  Not until the weekend probably. 

Everyone's exercise now is to find out if you can use cvsup.  FreeBSD and
Linux folk are ok.  BSDI folk are (apparently) not ok.  It's written in
modula-3, and unless your architecture has been ported to already it'll be
hopeless.  CVSup is at ftp://hub.freebsd.org/pub/CVSup.  Note that you
only need one box at your site that's of the right architecture ... 'cause
then you could just automate the cvsup on that box and do local cvs
updates from it. 

Dean

On Mon, 28 Jul 1997, Marc Slemko wrote:

> On Mon, 28 Jul 1997, Dean Gaudet wrote:
> 
> > Or we could use some form of anonymous cvs access.  Hey Marc ... any
> > ideas yet that you're happy are secure enough?  What if we had a
> > cvs pserver running on some non-standard port, in a uid/gid that owns
> > no files?  What if we made /export/home/cvs root.wheel owned, and
> > built a /etc, /lib, whatever in it and made it a chroot environ and
> > ran a pserver on that?
> 
> First you have to convince pserver to run happily as non-root, which
> shouldn't be too hard but would probably take a few source changes.  CVS
> does reader locks, so I don't think you can make it work in a repository
> that pserver can't write to.  I guess you could disable them, but that
> isn't nice.  My recommendation would be a seperate repository, either on
> taz or elsewhere, with a chrooted pserver and _no_ way to get root.  I
> don't think we can do the non-standard port thing, since I don't think
> there is a nice way to change the port pserver uses.  It could be bound to
> a specific interface on taz though, but that would require an IP address.
> 
> This is something that could be done on a third-party machine.  I would do
> it if I had time. 
> 
> 
> 


Re: [PATCH] http_main.c compile warning

Posted by Marc Slemko <ma...@worldgate.com>.
On Mon, 28 Jul 1997, Dean Gaudet wrote:

> Or we could use some form of anonymous cvs access.  Hey Marc ... any
> ideas yet that you're happy are secure enough?  What if we had a
> cvs pserver running on some non-standard port, in a uid/gid that owns
> no files?  What if we made /export/home/cvs root.wheel owned, and
> built a /etc, /lib, whatever in it and made it a chroot environ and
> ran a pserver on that?

First you have to convince pserver to run happily as non-root, which
shouldn't be too hard but would probably take a few source changes.  CVS
does reader locks, so I don't think you can make it work in a repository
that pserver can't write to.  I guess you could disable them, but that
isn't nice.  My recommendation would be a seperate repository, either on
taz or elsewhere, with a chrooted pserver and _no_ way to get root.  I
don't think we can do the non-standard port thing, since I don't think
there is a nice way to change the port pserver uses.  It could be bound to
a specific interface on taz though, but that would require an IP address.

This is something that could be done on a third-party machine.  I would do
it if I had time. 



Re: [PATCH] http_main.c compile warning

Posted by Dean Gaudet <dg...@arctic.org>.
Why the heck can't solaris header files be reasonable.  Yeah I'll back out
this change that I put in because removing const from a const * isn't a
friendly thing.

The method I used to maintain a local cvs repository was to do a vendor
merge using a snapshot.  It goes roughly like this.

to initialize your repository:
- unpack a snapshot
- find apache -name CVS | xargs rm -r
- cvs import -I \! apache apache SNAPSHOT_YYYYMMDD_HHMMSS

to update your repository
- unpack a snapshot
- find apache -name CVS | xargs rm -r
- cvs import -I \! apache apache SNAPSHOT_YYYYMMDD_HHMMSS
- cvs checkout -d merge apache
- cd merge
- cvs update -japache:yesterday -japache

That assumes you don't get the snapshots more than once daily.

It's really a pain in the butt... and we're working towards CVSup access
to the repository.  But we don't have a cvsup that works under BSDI at
the moment (and that's what www.apache.org runs).  I don't even know
what architectures it runs on cleanly ... other than FreeBSD and Linux (I
built it a few days ago).

Or we could use some form of anonymous cvs access.  Hey Marc ... any
ideas yet that you're happy are secure enough?  What if we had a
cvs pserver running on some non-standard port, in a uid/gid that owns
no files?  What if we made /export/home/cvs root.wheel owned, and
built a /etc, /lib, whatever in it and made it a chroot environ and
ran a pserver on that?

Dean

On Sun, 27 Jul 1997, Bill Morris wrote:

> I dont know if this is still a problem since I am having trouble
> updating my local repository. What is the "right" way to
> update a local repository from the CVS snapshots?
> 
> -bill
> 
> gcc -c   -O2 -DSOLARIS2=250   http_main.c
> http_main.c: In function `sock_bind':
> http_main.c:1864: warning: passing arg 2 of `bind' discards `const' from
> pointer target type