euglug.org

[작성자:] admin

  • [Eug-lug] Wrapping for Access Control



    Neil ParkerSat Jan 22 21:59:04 PST 2005

    Horst wrote,
    >Expanding on the python part.
    >The exception indicates the port is already 'taken' (LISTEN).
    >I don't understand TCP wrappers, but from Bob's comment I'd guess the
    >wrapper is listening to port:70(?)
    
    Actually, TCP wrappers doesn't listen on ANY port.
    
    Understanding TCP wrappers requires understanding how inetd works.
    Inetd reads a configuration file (/etc/inetd.conf) that tells it what
    ports to listen on, and what client programs to invoke when something tries
    to connect to those ports.  Inetd handles all the socket programming itself,
    and when it launches a client program to handle an incoming request, it
    connects the program's standard input and output to the socket.  So all the
    client program has to do is read from its standard input and write to its
    standard output.
    
    TCP wrappers includes a special client program called "tcpd".  The idea is
    that you tell inetd (via /etc/inetd.conf) to launch tcpd instead of the
    real client program.  Tcpd checks the origin of the connection using its
    hosts.allow and hosts.deny files, and if the tests pass, it launches the
    real client program.
    
    
    Programs that don't expect to run under inetd have to do all their socket
    handling all by themselves.  Fixing a standalone program to work under
    inetd generally means ripping out all that socket handling code and
    replacing it code that just reads from standard input and writes to standard
    output.
    
                   - Neil Parker
    
  • [Eug-lug] Computer time



    Neil ParkerSat Jan 22 21:46:08 PST 2005

    Bob Miller wrote,
    >Since I'm primarily an emacs user, I don't know the history of various
    >vi versions and clones.  The dominant vi variant today seems to be
    >vim, for "vi improved".  Maybe somebody else would like to fill that
    >part in?
    
    I'm not exactly an expert on this myself, but as a vi partisan, I feel
    compelled to post what I know.
    
    
    As far as I've been able to determine, Bill Joy's original vi source code
    was never made publicly available...every commercial UNIX vendor had their
    (often customized) version, but I've never seen an FTP site that had the
    source code.  I've heard rumors that Joy lost at least one version of the
    source code in a disk crash (a doubly-tragic event, since the lost source
    code is rumored to have included the ability to have two or more files
    open at once (an ability found in modern vi clones, but notably missing
    from Joy's original version)).
    
    In the absense of publicly-available source code for vi, there were
    several independent efforts to write a vi clone.  The most popular of
    these are "vim" and "elvis".  You may also run across "nvi", but it's a
    lot rarer (and the last time I looked at it, a lot less powerful--nvi was
    a pretty straight vi clone, whereas vim and elvis add tons of new
    features).
    
    Vi fans appear to be divided as to whether vim or elvis is better.
    Patrick Volkerding appears to be an elvis partisan--on every version of
    Slackware I've ever used, /usr/bin/vi is a symlink to /usr/bin/elvis.
    Other distributions (e.g. Mandrake) make vim the default instead.
    
    
    By the way, if you've ever used any full-screen software on the text
    screen (or xterm/konsole/gnome-terminal window), chances are it does its
    full-screen stuff by using the "curses" library.  Well, apparently the
    original version of the curses library was also written by Bill Joy, and
    he made it by ripping his screen-handling code out of vi and wrapping it
    up as a separate library.
    
                   - Neil Parker
    
  • [Eug-lug] Wrapping for Access Control



    Jeff_WSat Jan 22 18:17:45 PST 2005

    Bob Miller <kbob at jogger-egg.com> wrote:
    
    > > Anyways, is there some easy way of "wrapping" PYG for use w/ TCP
    > > Wrappers or do I need to look at something else like IP Filter,
    > > etc. ?
    >
    > A daemon has to be written differently to be invoked from inetd than
    > if it runs standalone.  If you're interested in doing that I'll
    > provide details.  But first, check the man page for flags that make it
    > work under inetd.
    
    Yeah, I found something in the gopher list archives from the author
    stating that there was no built-in inetd/xnetd support.  I'm curious
    if there is a python module or flag that might change the character
    of a program so as to allow invocation via inetd. John Goerzen,
    PYG's author, appears to be somewhat of an authority on python coding
    for network services so maybe it's not a trivial task:
    
    http://www.complete.org/
    
    Anyways, I've come across 'tcpserver' (part of ucspi-tcp by
    D. J. Bernstein, the Qmail guy) which might do the trick:
    
    http://cr.yp.to/ucspi-tcp.html
    
    -Jeff
    
  • [Eug-lug] Wrapping for Access Control



    Jeff_WSat Jan 22 18:00:31 PST 2005

    Jacob Meuser <jakemsr at jakemsr.com> wrote:
    
    > > is there an EXAMPLES section in your tcpd(8)?
    >
    > I just checked online ... NetBSD doesn't even have a tcpd manpage?
    
    LOL - yeah, it probably gets installed with the pkgsrc (stock)
    version.  It's probably the same man page as in OpenBSD.  Much of
    the useage seems covered in the hosts_access(5) and hosts_options(5)
    pages.
    
  • [Eug-lug] Wrapping for Access Control



    Jeff_WSat Jan 22 17:56:16 PST 2005

    Jacob Meuser <jakemsr at jakemsr.com> wrote:
    
    > On Fri, Jan 21, 2005 at 11:06:13PM -0800, Jeff_W wrote:
    >
    > > # added for TCP Wrappers control of pygopherd - beaker: 1/20/2005
    > > pygopherd  stream  tcp   nowait  root   /usr/pkg/bin/pygopherd  pygopherd
    >
    > are you _sure_ you don't have to specify tcpd there?
    >
    > pygopherd  stream  tcp   nowait  root   /usr/libexec/tcpd  pygopherd
    
    Yes, I fairly certain:
    (from netbsd's HOSTS_ACCESS(5))
      ...
      Note that in a `stock' installation of the tcp_wrappers
      package, a program called tcpd is called from /etc/inetd.conf,
      and this program performs the wrapper checks and  then
      executes  the daemon.  In  NetBSD  inetd(8)  has  been
      modified  to perform this check internally, and so tcpd is
      neither used nor supplied.
      ...
    
    > is there an EXAMPLES section in your tcpd(8)?
    
    See above; there is no tcpd in the base system, however the stock
    tcpd package is available in pkgsrc.  I suspect is replaces the
    original modified version of inetd when installed.
    
    > > I should mention that when I use the tcpdchk & tcpmatch tools
    > > everything appears to work (allow LAN hosts; deny outsiders):
    >
    > they don't actually run the program in question.  they just check
    > hosts.allow and hosts.deny.
    
    I figured as much.
    
  • [Eug-lug] Gnuing on OSX



    T. Joseph CARTERSat Jan 22 16:13:41 PST 2005

    On Sat, Jan 22, 2005 at 06:09:12PM +0000, fleming.j at comcast.net wrote:
    > I am trying to sort out all the different options for Gnu on OSX. I am
    > downloading XCode-1.5 to begin, but I've seen so many ways to install
    > stuff (Darwin ports, fink, etc ) I was hoping to get a quick opinion or
    > comparision from the experienced OSX users.  Fire when ready.
    
    You want fink.  The developers are reasonably with it, the tree is
    reasonably large, and the dependency checking is reasonably based on
    Debian's dpkg, though it is currently mostly a build from source setup,
    like darwinports.  You also don't get as much attitude from the developers
    when you need to ask a question about something.
    
    
  • [Eug-lug] Computer time



    T. Joseph CARTERSat Jan 22 16:10:34 PST 2005

    On Sat, Jan 22, 2005 at 09:39:18AM -0800, Allen Brown wrote:
    > Nano is the editor that pine uses?  I can't stand it.
    
    No, that's pico.  And pico is non-free.  So the GNU people made a pico
    that was free and called it nano.  They didn't think to improve it much in
    the process, but at least it hasn't had any major security holes for which
    the license places restrictions on distributing patched versions, as is
    the case with pine.  ;p
    
    
  • [Eug-lug] mac-mini mac-slack-ub-lin meeting



    T. Joseph CARTERSat Jan 22 15:57:46 PST 2005

    On Sat, Jan 22, 2005 at 02:45:34PM -0800, perdurabo wrote:
    > What are you? Some sicko? Us Mac fanboys use firewire and USB2...
    > crack a case? psshhh!
    
    It has 256 MB of RAM.  He's cracking the case.  ;)
    
  • [Eug-lug] mac-mini mac-slack-ub-lin meeting



    T. Joseph CARTERSat Jan 22 15:56:52 PST 2005

    On Sat, Jan 22, 2005 at 10:08:48AM -0800, Bob Miller wrote:
    > > So wait.  You bought the ideal second (or third) computer to run MacOS X
    > > on, and you're not going to run MacOS X on it?
    > 
    > I think the ideal upgrade for a Mac Mini would be running the
    > IDE cable out the back so disks can be swapped without opening
    > the case.  Then you can use a 3.5" disk, which is cheaper, faster
    > and higher capacity than the 2.5" disks.
    
    We have confirmation on 2.5" drives then?  There's room in that housing
    for a 3.5" ...
    
  • [Eug-lug] Computer time



    Jacob MeuserSat Jan 22 15:28:58 PST 2005

    On Sat, Jan 22, 2005 at 09:31:03AM -0800, Bob Miller wrote:
    > Jim K wrote:
    > 
    > >      I just did a man ex on a mandrake 10 community system and it 
    > > displayed the vim man page. Is ex just an alias for vim?
    > 
    > Okay, guys.  Time for text editor history class.
    
    ...
    
    > That's the Emacs family.
    
    you left out the "micro" Emacs subset.  there's 'em' on kernel.org
    under software/editors/uemacs, 'mg' in the OpenBSD source tree
    (this is my $EDITOR), and 'ng' which has support for Japanese.
    
    -- 
    <jakemsr at jakemsr.com>