mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-06-11 09:29:27 +00:00
Compare commits
21 Commits
pre_unprov
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
2b1afe29bf | ||
|
44d6501ffd | ||
|
44ab20dfb9 | ||
|
8e8cb4800f | ||
|
4d5d42f859 | ||
|
7666e5ed8b | ||
|
faef86c362 | ||
|
b5dc0fa710 | ||
|
0e5947fff1 | ||
|
7be95f5f1b | ||
|
54a632e410 | ||
|
be00396c26 | ||
|
a5d25d1c6e | ||
|
38ea34b864 | ||
|
ab2be98bb1 | ||
|
f325d45831 | ||
|
80b1baffa8 | ||
|
d6e93b6a9c | ||
|
67c6566841 | ||
|
a353321531 | ||
|
0df1477cf9 |
38
Makefile
38
Makefile
|
@ -2,7 +2,43 @@
|
|||
# This file is intended for use with dmake. There are constructs in
|
||||
# here that (as yet) make it unsuitable to be used on the GS.
|
||||
#
|
||||
# $Id: Makefile,v 1.5 1997/12/22 01:11:08 gdr Exp $
|
||||
# $Id: Makefile,v 1.6 2012/08/26 02:54:57 gdr Exp $
|
||||
#
|
||||
|
||||
.INCLUDE: /src/gno/paths.mk
|
||||
|
||||
INSTALL *= /usr/bin/install
|
||||
CHTYP *= /bin/chtyp
|
||||
|
||||
headerInstall .USESHELL:
|
||||
$(CHTYP) -lasm $(SRC_DIR)/gno/ainclude/m*
|
||||
$(CHTYP) -lrez $(SRC_DIR)/gno/rinclude/*.rez
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/arpa/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/gno/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/machine/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/net/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/netinet/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/protocols/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/rpc/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/include/sys/*.h
|
||||
$(CHTYP) -lcc $(SRC_DIR)/gno/orcacdefs/*.h
|
||||
$(INSTALL) $(SRC_DIR)/gno/ainclude/m* /usr/ainclude
|
||||
$(INSTALL) $(SRC_DIR)/gno/rinclude/*.rez /usr/rinclude
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/*.h /usr/include
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/arpa/*.h /usr/include/arpa
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/gno/*.h /usr/include/gno
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/machine/*.h /usr/include/machine
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/net/*.h /usr/include/net
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/netinet/*.h /usr/include/netinet
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/protocols/*.h /usr/include/protocols
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/rpc/*.h /usr/include/rpc
|
||||
$(INSTALL) $(SRC_DIR)/gno/include/sys/*.h /usr/include/sys
|
||||
$(INSTALL) $(SRC_DIR)/gno/orcacdefs/*.h /lib/orcacdefs
|
||||
|
||||
#
|
||||
# The remaining macros, targets, and recipies were used before trenco
|
||||
# was fully serving the GNO stuff.
|
||||
#
|
||||
XFER = xfer
|
||||
TMP = /tmp/gnobuild
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* *
|
||||
* Devin Reade, 10 April 1998. *
|
||||
* *
|
||||
* $Id: status.bin,v 1.21 1999/04/29 15:48:51 gdr-ftp Exp $ *
|
||||
* $Id: status.bin,v 1.22 2012/08/26 02:54:58 gdr Exp $ *
|
||||
* *
|
||||
*************************************************************************
|
||||
|
||||
|
@ -95,7 +95,7 @@ Program 204 Req Owner Source Man Compile Test Target Target [Note] Comments
|
|||
/bin/conv Y # should be replaced by /usr/bin/udl
|
||||
/bin/cp Y Y
|
||||
/bin/csh
|
||||
/bin/date Y Y tl Y
|
||||
/bin/date Y Y mober Y # uploaded to mail distrib on trenco
|
||||
/bin/dd
|
||||
/bin/df N Y evan Y T Y Y Y RI
|
||||
/bin/domainname
|
||||
|
@ -128,7 +128,7 @@ Program 204 Req Owner Source Man Compile Test Target Target [Note] Comments
|
|||
/bin/purge Y Y . Y . . . Y
|
||||
/bin/pwd N Y dave Y T Y Y Y RI
|
||||
/bin/rcp N Y dt Y T Y . Y RI
|
||||
/bin/rm Y Y tribby
|
||||
/bin/rm Y Y tribby Y T Y Y Y RI
|
||||
/bin/rmail N N
|
||||
/bin/rmdir N Y gdr Y T Y Y Y RI
|
||||
/bin/sh N Y gdr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$Id: status.lib,v 1.8 1999/01/09 21:28:35 gdr-ftp Exp $
|
||||
$Id: status.lib,v 1.9 2012/08/26 02:54:58 gdr Exp $
|
||||
|
||||
Key for Code Status column:
|
||||
R == reviewed
|
||||
|
@ -352,6 +352,7 @@ strncasecmp libc/str/case.c C 3 string.h
|
|||
strsep libc/string/str.c C 3 string.h
|
||||
stty libc/gen/compat.c C 3 sgtty.h
|
||||
suboptarg [var] libc/stdlib/getsubopt.c C 3 stdlib.h
|
||||
swab libc/string/swab.c C 3 string.h
|
||||
swait libc/sys/trap.asm T 2 gno/gno.h
|
||||
sys_errlist [var] libc/stdio/perror.c T 3 stdio.h
|
||||
sys_nerr [var] libc/stdio/perror.c T 3 stdio.h
|
||||
|
@ -399,7 +400,7 @@ writev libc/sys/syscall.c T 2 sys/uio.h
|
|||
zopen libc/stdio/ stdio.h
|
||||
|
||||
Notes:
|
||||
[var] symbol is a variable, not a fuction
|
||||
[var] symbol is a variable, not a function
|
||||
[A] function needs to be modified before use
|
||||
[B] these sets of routines rely on a modified utmp/wtmp file
|
||||
structure. Therefore a large list of routines and programs
|
||||
|
@ -538,6 +539,7 @@ BANK MODEL COMPLETE
|
|||
78 0 0 Y N libc/string/case.c
|
||||
78 0 0 Y N libc/string/str.c
|
||||
78 0 0 Y Y libc/string/strerror.c
|
||||
78 0 0 Y N libc/string/swab.c
|
||||
|
||||
78 0 0 Y libc/sys/exec.c
|
||||
78 0 0 Y libc/sys/syscall.c
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
***********************************************************************
|
||||
*
|
||||
* MKDIR.ASM - Version 1.0
|
||||
* Written by Tim Meekins
|
||||
* Copyright (C) 1991 by Procyon, Inc.
|
||||
* This program is hereby donated to the public domain.
|
||||
*
|
||||
* This program creates a new directory in the current (or specified)
|
||||
* directory.
|
||||
*
|
||||
* TODO:
|
||||
* o Add -p option.
|
||||
* o Should I support creating multiple directories like Unix?
|
||||
*
|
||||
* HISTORY:
|
||||
* 1.0 11/29/91 First version.
|
||||
*
|
||||
**************************************************************************
|
||||
|
||||
keep mkdir
|
||||
mcopy mkdir.mac
|
||||
|
||||
mkdir START
|
||||
jml ~GNO_COMMAND
|
||||
END
|
||||
|
||||
main START
|
||||
|
||||
arg equ 0
|
||||
retval equ arg+4
|
||||
space equ retval+2
|
||||
|
||||
subroutine (2:argc,4:argv),space
|
||||
|
||||
stz retval
|
||||
|
||||
lda argc
|
||||
dec a
|
||||
bne part2
|
||||
ErrWriteCString #usage
|
||||
jmp error
|
||||
part2 dec a
|
||||
beq part3
|
||||
ErrWriteCString #oneerr
|
||||
jmp error
|
||||
|
||||
part3 ldy #4
|
||||
lda [argv],y
|
||||
sta arg
|
||||
iny2
|
||||
lda [argv],y
|
||||
sta arg+2
|
||||
|
||||
ldy #0
|
||||
short a
|
||||
loop lda [arg],y
|
||||
beq part4
|
||||
sta pathname+2,y
|
||||
iny
|
||||
bra loop
|
||||
|
||||
part4 long a
|
||||
sty pathname
|
||||
Create createparm
|
||||
bcc done
|
||||
|
||||
sta errval
|
||||
|
||||
ErrWriteCString #errleadin
|
||||
Error errval
|
||||
|
||||
error inc retval
|
||||
|
||||
done return 2:retval
|
||||
|
||||
createparm dc i2'5'
|
||||
createpath dc i4'pathname'
|
||||
dc i2'$C3'
|
||||
dc i2'$0F'
|
||||
dc i4'$0000'
|
||||
dc i2'$0D'
|
||||
|
||||
errval dc i2'0'
|
||||
|
||||
usage dc c'Usage: mkdir directory.',h'0d0a00'
|
||||
oneerr dc c'mkdir: too many arguments.',h'0d0a00'
|
||||
errleadin dc c'mkdir: ',h'00'
|
||||
|
||||
pathname dc i2'0'
|
||||
ds 256 ;I dread any person entering a pathname
|
||||
; ;this long!
|
||||
|
||||
END
|
|
@ -1,247 +0,0 @@
|
|||
macro
|
||||
&lab subroutine &parms,&work
|
||||
&lab anop
|
||||
aif c:&work,.a
|
||||
lclc &work
|
||||
&work setc 0
|
||||
.a
|
||||
gbla &totallen
|
||||
gbla &worklen
|
||||
&worklen seta &work
|
||||
&totallen seta 0
|
||||
aif c:&parms=0,.e
|
||||
lclc &len
|
||||
lclc &p
|
||||
lcla &i
|
||||
&i seta c:&parms
|
||||
.b
|
||||
&p setc &parms(&i)
|
||||
&len amid &p,2,1
|
||||
aif "&len"=":",.c
|
||||
&len amid &p,1,2
|
||||
&p amid &p,4,l:&p-3
|
||||
ago .d
|
||||
.c
|
||||
&len amid &p,1,1
|
||||
&p amid &p,3,l:&p-2
|
||||
.d
|
||||
&p equ &totallen+3+&work
|
||||
&totallen seta &totallen+&len
|
||||
&i seta &i-1
|
||||
aif &i,^b
|
||||
.e
|
||||
tsc
|
||||
sec
|
||||
sbc #&work
|
||||
tcs
|
||||
inc a
|
||||
phd
|
||||
tcd
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
mend
|
||||
macro
|
||||
&lab return &r
|
||||
&lab anop
|
||||
lclc &len
|
||||
aif c:&r,.a
|
||||
lclc &r
|
||||
&r setc 0
|
||||
&len setc 0
|
||||
ago .h
|
||||
.a
|
||||
&len amid &r,2,1
|
||||
aif "&len"=":",.b
|
||||
&len amid &r,1,2
|
||||
&r amid &r,4,l:&r-3
|
||||
ago .c
|
||||
.b
|
||||
&len amid &r,1,1
|
||||
&r amid &r,3,l:&r-2
|
||||
.c
|
||||
aif &len<>2,.d
|
||||
ldy &r
|
||||
ago .h
|
||||
.d
|
||||
aif &len<>4,.e
|
||||
ldx &r+2
|
||||
ldy &r
|
||||
ago .h
|
||||
.e
|
||||
aif &len<>10,.g
|
||||
ldy #&r
|
||||
ldx #^&r
|
||||
ago .h
|
||||
.g
|
||||
mnote 'Not a valid return length',16
|
||||
mexit
|
||||
.h
|
||||
aif &totallen=0,.i
|
||||
lda &worklen+1
|
||||
sta &worklen+&totallen+1
|
||||
lda &worklen
|
||||
sta &worklen+&totallen
|
||||
.i
|
||||
plb
|
||||
pld
|
||||
tsc
|
||||
clc
|
||||
adc #&worklen+&totallen
|
||||
tcs
|
||||
aif &len=0,.j
|
||||
tya
|
||||
.j
|
||||
rtl
|
||||
mend
|
||||
macro
|
||||
&lab ErrWriteCString &a1
|
||||
&lab ph4 &a1
|
||||
Tool $210c
|
||||
mend
|
||||
macro
|
||||
&lab ERROR &a1
|
||||
&lab p16 $105,&a1
|
||||
mend
|
||||
macro
|
||||
&lab Create &a1
|
||||
&lab gsos $2001,&a1
|
||||
mend
|
||||
macro
|
||||
&lab tool &a1
|
||||
&lab ldx #&a1
|
||||
jsl $e10000
|
||||
mend
|
||||
macro
|
||||
&lab p16 &a1,&a2
|
||||
&lab jsl $E100A8
|
||||
dc i2'&a1'
|
||||
dc i4'&a2'
|
||||
mend
|
||||
macro
|
||||
&lab gsos &a1,&a2
|
||||
&lab jsl $E100A8
|
||||
dc i2'&a1'
|
||||
dc i4'&a2'
|
||||
mend
|
||||
macro
|
||||
&lab ph4 &parm
|
||||
lclc &char
|
||||
lclc &char1
|
||||
lclc &char2
|
||||
&lab anop
|
||||
&char amid &parm,1,1
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="@",.at
|
||||
aif s:longa=1,.chk1
|
||||
rep #%00100000
|
||||
.chk1
|
||||
aif "&char"<>"{",.chk2
|
||||
&char amid &parm,l:&parm,1
|
||||
aif "&char"<>"}",.error
|
||||
&parm amid &parm,2,l:&parm-2
|
||||
ldy #2
|
||||
lda (&parm),y
|
||||
pha
|
||||
lda (&parm)
|
||||
pha
|
||||
ago .shorten
|
||||
.chk2
|
||||
aif "&char"<>"[",.absolute
|
||||
ldy #2
|
||||
lda &parm,y
|
||||
pha
|
||||
lda &parm
|
||||
pha
|
||||
ago .shorten
|
||||
.absolute
|
||||
lda &parm+2
|
||||
pha
|
||||
lda &parm
|
||||
pha
|
||||
ago .shorten
|
||||
.at
|
||||
&char1 amid &parm,2,1
|
||||
&char2 setc &char1
|
||||
ph&char1
|
||||
aif l:&parm<3,.chk2a
|
||||
&char2 amid &parm,3,1
|
||||
.chk2a
|
||||
ph&char2
|
||||
ago .shorten
|
||||
.immediate
|
||||
&parm amid &parm,2,l:&parm-1
|
||||
pea +(&parm)|-16
|
||||
pea &parm
|
||||
ago .done
|
||||
.shorten
|
||||
aif s:longa=1,.done
|
||||
sep #%00100000
|
||||
.done
|
||||
mexit
|
||||
.error
|
||||
mnote "Missing closing '}'",16
|
||||
mend
|
||||
macro
|
||||
&lab long &stat
|
||||
&lab anop
|
||||
lcla &t
|
||||
lcla &len
|
||||
lclc &ch
|
||||
&t seta 0
|
||||
&len seta l:&stat
|
||||
.a
|
||||
aif &len=0,.b
|
||||
&ch amid &stat,&len,1
|
||||
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
|
||||
aif ("&ch"="a").or.("&ch"="m"),.m
|
||||
.c
|
||||
&len seta &len-1
|
||||
ago ^a
|
||||
.i
|
||||
longi on
|
||||
&t seta &t+16
|
||||
ago ^c
|
||||
.m
|
||||
longa on
|
||||
&t seta &t+32
|
||||
ago ^c
|
||||
.b
|
||||
aif &t=0,.d
|
||||
rep #&t
|
||||
.d
|
||||
mend
|
||||
macro
|
||||
&lab short &stat
|
||||
&lab anop
|
||||
lcla &t
|
||||
lcla &len
|
||||
lclc &ch
|
||||
&t seta 0
|
||||
&len seta l:&stat
|
||||
.a
|
||||
aif &len=0,.b
|
||||
&ch amid &stat,&len,1
|
||||
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
|
||||
aif ("&ch"="a").or.("&ch"="m"),.m
|
||||
.c
|
||||
&len seta &len-1
|
||||
ago ^a
|
||||
.i
|
||||
longi off
|
||||
&t seta &t+16
|
||||
ago ^c
|
||||
.m
|
||||
longa off
|
||||
&t seta &t+32
|
||||
ago ^c
|
||||
.b
|
||||
aif &t=0,.d
|
||||
sep #&t
|
||||
.d
|
||||
mend
|
||||
macro
|
||||
&lab iny2
|
||||
&lab iny
|
||||
iny
|
||||
mend
|
|
@ -52,7 +52,6 @@ extern int getopt(int,char **,char*);
|
|||
exit(2);
|
||||
}
|
||||
if (inRow < 4) inRow = 4;
|
||||
printf("optind: %d argc: %d\n",optind,argc);
|
||||
argv += optind;
|
||||
buffer = (unsigned char *)malloc(bufSize);
|
||||
string = (unsigned char *)malloc(stringSize);
|
||||
|
|
|
@ -85,7 +85,7 @@ __OFLAG = -a0
|
|||
AR := makelib #ar # archiver
|
||||
ARFLAGS+= #ruv
|
||||
|
||||
RM := /bin/cp -p rm # remove a file command
|
||||
RM := /bin/rm # remove a file command
|
||||
RMFLAGS +=
|
||||
|
||||
CP := /bin/cp # copy files command
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# Devin Reade, September 1997.
|
||||
#
|
||||
# $Id: fudgeinstall,v 1.9 1999/02/15 21:39:11 gdr-ftp Exp $
|
||||
# $Id: fudgeinstall,v 1.10 2012/08/26 02:54:59 gdr Exp $
|
||||
|
||||
# What is our release directory? (The second one must be HFS, and
|
||||
# may be the same as the first.)
|
||||
|
@ -93,7 +93,7 @@ install -dV $RELDIR/var/run
|
|||
install -dV $RELDIR/var/spool
|
||||
|
||||
echo "installing files in /"
|
||||
install -V $ROOT/kern.971027 $RELDIR/kern
|
||||
# kern done
|
||||
install -V $SRC/gno/verbatim/initrc $RELDIR
|
||||
|
||||
echo "installing files in /HFSinclude"
|
||||
|
@ -120,7 +120,7 @@ echo "installing files in /bin"
|
|||
# aroff done
|
||||
# binprint done
|
||||
# cat done
|
||||
install -V /bin/center $RELDIR/bin
|
||||
# center done
|
||||
install -V /usr/orca/bin/chmod $RELDIR/bin
|
||||
# chtyp done
|
||||
# cmp done
|
||||
|
@ -170,10 +170,10 @@ install -V /bin/vi $RELDIR/bin
|
|||
# wc done
|
||||
# yes done
|
||||
|
||||
echo "installing files in /dev"
|
||||
install -V /dev/modem $RELDIR/dev
|
||||
install -V /dev/printer $RELDIR/dev
|
||||
install -V /dev/null $RELDIR/dev
|
||||
# echo "installing files in /dev"
|
||||
# /dev/modem done
|
||||
# /dev/null done
|
||||
# /dev/printer done
|
||||
|
||||
echo "installing files in /etc"
|
||||
# don't need cronlog, crontab yet
|
||||
|
|
|
@ -29,3 +29,4 @@ include $(SRCROOT)/doc/etc/tailcat.mk
|
|||
|
||||
clobber::
|
||||
-/bin/rm -rf $(OUTPUT_DIR)
|
||||
|
||||
|
|
|
@ -39,3 +39,4 @@ This should normally only be done for the official GNO web server.
|
|||
|
||||
To install the reference manuals:
|
||||
make install
|
||||
|
||||
|
|
|
@ -59,6 +59,6 @@ typedef _BSD_WCHAR_T_ wchar_t;
|
|||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
|
||||
#define offsetof(type,member) ((size_t) (&(((type *)0L)->member)))
|
||||
|
||||
#endif /* _STDDEF_H_ */
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)signal.h 8.2 (Berkeley) 1/21/94
|
||||
* $Id: signal.h,v 1.3 1997/07/28 02:55:56 gdr Exp $
|
||||
* $Id: signal.h,v 1.4 2012/08/26 02:54:59 gdr Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SIGNAL_H_
|
||||
|
@ -48,6 +48,20 @@
|
|||
#include <machine/signal.h> /* sigcontext; codes for SIGILL, SIGFPE */
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
/*
|
||||
* The kernel doesn't currently use these macros, but if they ever get
|
||||
* into the kernel sources, they'd really cause havoc; the numbers differ
|
||||
* between GNO and ORCA/C
|
||||
*/
|
||||
#undef SIGABRT
|
||||
#undef SIGFPE
|
||||
#undef SIGILL
|
||||
#undef SIGINT
|
||||
#undef SIGSEGV
|
||||
#undef SIGTERM
|
||||
#endif
|
||||
|
||||
#define SIGHUP 1 /* hangup */
|
||||
#define SIGINT 2 /* interrupt */
|
||||
#define SIGQUIT 3 /* quit */
|
||||
|
|
116
include/sysexits.h
Normal file
116
include/sysexits.h
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* Copyright (c) 1987, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)sysexits.h 8.1 (Berkeley) 6/2/93
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _SYSEXITS_H_
|
||||
#define _SYSEXITS_H_
|
||||
|
||||
/*
|
||||
* SYSEXITS.H -- Exit status codes for system programs.
|
||||
*
|
||||
* This include file attempts to categorize possible error
|
||||
* exit statuses for system programs, notably delivermail
|
||||
* and the Berkeley network.
|
||||
*
|
||||
* Error numbers begin at EX__BASE to reduce the possibility of
|
||||
* clashing with other exit statuses that random programs may
|
||||
* already return. The meaning of the codes is approximately
|
||||
* as follows:
|
||||
*
|
||||
* EX_USAGE -- The command was used incorrectly, e.g., with
|
||||
* the wrong number of arguments, a bad flag, a bad
|
||||
* syntax in a parameter, or whatever.
|
||||
* EX_DATAERR -- The input data was incorrect in some way.
|
||||
* This should only be used for user's data & not
|
||||
* system files.
|
||||
* EX_NOINPUT -- An input file (not a system file) did not
|
||||
* exist or was not readable. This could also include
|
||||
* errors like "No message" to a mailer (if it cared
|
||||
* to catch it).
|
||||
* EX_NOUSER -- The user specified did not exist. This might
|
||||
* be used for mail addresses or remote logins.
|
||||
* EX_NOHOST -- The host specified did not exist. This is used
|
||||
* in mail addresses or network requests.
|
||||
* EX_UNAVAILABLE -- A service is unavailable. This can occur
|
||||
* if a support program or file does not exist. This
|
||||
* can also be used as a catchall message when something
|
||||
* you wanted to do doesn't work, but you don't know
|
||||
* why.
|
||||
* EX_SOFTWARE -- An internal software error has been detected.
|
||||
* This should be limited to non-operating system related
|
||||
* errors as possible.
|
||||
* EX_OSERR -- An operating system error has been detected.
|
||||
* This is intended to be used for such things as "cannot
|
||||
* fork", "cannot create pipe", or the like. It includes
|
||||
* things like getuid returning a user that does not
|
||||
* exist in the passwd file.
|
||||
* EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
|
||||
* etc.) does not exist, cannot be opened, or has some
|
||||
* sort of error (e.g., syntax error).
|
||||
* EX_CANTCREAT -- A (user specified) output file cannot be
|
||||
* created.
|
||||
* EX_IOERR -- An error occurred while doing I/O on some file.
|
||||
* EX_TEMPFAIL -- temporary failure, indicating something that
|
||||
* is not really an error. In sendmail, this means
|
||||
* that a mailer (e.g.) could not create a connection,
|
||||
* and the request should be reattempted later.
|
||||
* EX_PROTOCOL -- the remote system returned something that
|
||||
* was "not possible" during a protocol exchange.
|
||||
* EX_NOPERM -- You did not have sufficient permission to
|
||||
* perform the operation. This is not intended for
|
||||
* file system problems, which should use NOINPUT or
|
||||
* CANTCREAT, but rather for higher level permissions.
|
||||
*/
|
||||
|
||||
#define EX_OK 0 /* successful termination */
|
||||
|
||||
#define EX__BASE 64 /* base value for error messages */
|
||||
|
||||
#define EX_USAGE 64 /* command line usage error */
|
||||
#define EX_DATAERR 65 /* data format error */
|
||||
#define EX_NOINPUT 66 /* cannot open input */
|
||||
#define EX_NOUSER 67 /* addressee unknown */
|
||||
#define EX_NOHOST 68 /* host name unknown */
|
||||
#define EX_UNAVAILABLE 69 /* service unavailable */
|
||||
#define EX_SOFTWARE 70 /* internal software error */
|
||||
#define EX_OSERR 71 /* system error (e.g., can't fork) */
|
||||
#define EX_OSFILE 72 /* critical OS file missing */
|
||||
#define EX_CANTCREAT 73 /* can't create (user) output file */
|
||||
#define EX_IOERR 74 /* input/output error */
|
||||
#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
|
||||
#define EX_PROTOCOL 76 /* remote error in protocol */
|
||||
#define EX_NOPERM 77 /* permission denied */
|
||||
#define EX_CONFIG 78 /* configuration error */
|
||||
|
||||
#define EX__MAX 78 /* maximum listed value */
|
||||
|
||||
#endif /* !_SYSEXITS_H_ */
|
|
@ -35,7 +35,7 @@
|
|||
* This is an old implementation and needs to be replaced; just not quite
|
||||
* yet -- gdr
|
||||
*
|
||||
* $Id: getpwent.c,v 1.2 1997/09/21 06:05:00 gdr Exp $
|
||||
* $Id: getpwent.c,v 1.3 2012/08/26 02:54:59 gdr Exp $
|
||||
*
|
||||
* This file is formatted with tab stops every 8 characters.
|
||||
*/
|
||||
|
@ -44,8 +44,6 @@
|
|||
segment "libc_gen__";
|
||||
#endif
|
||||
|
||||
#define _PATH_PASSWD "/etc/passwd"
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)getpwent.c 5.21 (Berkeley) 3/14/91";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
@ -59,7 +57,6 @@ static char sccsid[] = "@(#)getpwent.c 5.21 (Berkeley) 3/14/91";
|
|||
#include <err.h>
|
||||
|
||||
#define LENGTH 128
|
||||
#define _PATH_PASSWD "/etc/passwd"
|
||||
|
||||
static struct passwd _pw_passwd; /* password structure */
|
||||
static char pwline[LENGTH]; /* line in /etc/passwd */
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
#
|
||||
# Makefile for libc/stdtime.
|
||||
#
|
||||
# $Id: Makefile,v 1.3 1998/02/09 08:45:04 taubert Exp $
|
||||
# $Id: Makefile,v 1.4 2012/08/26 02:54:59 gdr Exp $
|
||||
#
|
||||
|
||||
LIB= c
|
||||
LIBPFX= $(OBJ_DIR)../
|
||||
OBJS= asctime.o difftime.o localtime.o strftime.o
|
||||
LIB = c
|
||||
LIBPFX = $(OBJ_DIR)../
|
||||
NO_REZ = true
|
||||
# SRCS = asctime.c difftime.c localtime.c strftime.c
|
||||
SRCS = localtime.c strftime.c
|
||||
|
||||
DEBUG = 25
|
||||
OPTIMIZE= 0
|
||||
CFLAGS += -v
|
||||
|
||||
default:
|
||||
@echo do not use this directory yet
|
||||
#default:
|
||||
# @echo do not use this directory yet
|
||||
|
||||
.INCLUDE: /src/gno/lib/lib.mk
|
||||
|
||||
asctime.o:: private.h
|
||||
difftime.o:: private.h
|
||||
localtime.o:: private.h
|
||||
strftime.o:: private.h
|
||||
asctime.o: private.h
|
||||
difftime.o: private.h
|
||||
localtime.o: private.h
|
||||
strftime.o: private.h
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: localtime.c,v 1.1 1997/09/21 06:22:10 gdr Exp $
|
||||
* $Id: localtime.c,v 1.2 2012/08/26 02:54:59 gdr Exp $
|
||||
*
|
||||
* This file is formatted for tab stops every 8 columns.
|
||||
*/
|
||||
|
@ -1278,6 +1278,8 @@ register struct tm * const tmp;
|
|||
#endif /* defined TM_GMTOFF */
|
||||
}
|
||||
|
||||
#ifndef __ORCAC__
|
||||
|
||||
char *
|
||||
#ifdef USE_PROTOS
|
||||
ctime(const time_t * const timep)
|
||||
|
@ -1294,6 +1296,7 @@ const time_t * const timep;
|
|||
*/
|
||||
return asctime(localtime(timep));
|
||||
}
|
||||
#endif /* __ORCAC__ */
|
||||
|
||||
/*
|
||||
** Adapted from code provided by Robert Elz, who writes:
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: strftime.c,v 1.1 1997/09/21 06:22:10 gdr Exp $
|
||||
* $Id: strftime.c,v 1.2 2012/08/26 02:54:59 gdr Exp $
|
||||
*
|
||||
* This file is formatted for tab stops every 8 columns.
|
||||
*/
|
||||
|
@ -22,11 +22,14 @@
|
|||
#ifdef __ORCAC__
|
||||
segment "libc_stdtm";
|
||||
#define NOID
|
||||
#define CONST
|
||||
#else
|
||||
#define CONST const
|
||||
#endif
|
||||
|
||||
#ifdef LIBC_RCS
|
||||
static const char rcsid[] =
|
||||
"$Id: strftime.c,v 1.1 1997/09/21 06:22:10 gdr Exp $";
|
||||
"$Id: strftime.c,v 1.2 2012/08/26 02:54:59 gdr Exp $";
|
||||
#endif
|
||||
|
||||
#ifndef lint
|
||||
|
@ -52,7 +55,9 @@ static const char sccsid[] = "@(#)strftime.c 5.4 (Berkeley) 3/14/89";
|
|||
#include <locale.h>
|
||||
#include <rune.h> /* for _PATH_LOCALE */
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef __ORCAC__
|
||||
#include <string.h> /* for memcpy() */
|
||||
#endif
|
||||
#define LOCALE_HOME _PATH_LOCALE
|
||||
|
||||
struct lc_time_T {
|
||||
|
@ -69,12 +74,16 @@ struct lc_time_T {
|
|||
};
|
||||
|
||||
static struct lc_time_T localebuf;
|
||||
#ifdef __ORCAC__
|
||||
#define Locale (&C_time_locale)
|
||||
#else
|
||||
static struct lc_time_T * _loc P((void));
|
||||
static int using_locale;
|
||||
|
||||
#define Locale (using_locale ? &localebuf : &C_time_locale)
|
||||
#endif
|
||||
|
||||
static const struct lc_time_T C_time_locale = {
|
||||
static CONST struct lc_time_T C_time_locale = {
|
||||
{
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
|
@ -121,7 +130,7 @@ static const struct lc_time_T C_time_locale = {
|
|||
|
||||
static char * _add P((const char *, char *, const char *));
|
||||
static char * _conv P((int, const char *, char *, const char *));
|
||||
static char * _fmt P((const char *, const struct tm *, char *, const char *));
|
||||
static char * _fmt P((const char *, CONST struct tm *, char *, CONST char *));
|
||||
static char * _secs P((const struct tm *, char *, const char *));
|
||||
|
||||
size_t strftime P((char *, size_t, const char *, const struct tm *));
|
||||
|
@ -152,8 +161,8 @@ strftime(s, maxsize, format, t)
|
|||
|
||||
static char *
|
||||
#ifdef USE_PROTOS
|
||||
_fmt(const char *format, const struct tm *const t, char *pt,
|
||||
const char *const ptlim)
|
||||
_fmt(const char *format, CONST struct tm *CONST t, char *pt,
|
||||
CONST char *CONST ptlim)
|
||||
#else
|
||||
_fmt(format, t, pt, ptlim)
|
||||
const char *format;
|
||||
|
@ -415,9 +424,12 @@ label:
|
|||
pt, ptlim);
|
||||
continue;
|
||||
case 'Z':
|
||||
#ifndef __ORCAC__
|
||||
/* we don't currently have the tm_zone field */
|
||||
if (t->tm_zone != NULL)
|
||||
pt = _add(t->tm_zone, pt, ptlim);
|
||||
else
|
||||
#endif
|
||||
if (t->tm_isdst == 0 || t->tm_isdst == 1) {
|
||||
pt = _add(tzname[t->tm_isdst],
|
||||
pt, ptlim);
|
||||
|
@ -476,7 +488,15 @@ _secs(t, pt, ptlim)
|
|||
struct tm tmp;
|
||||
|
||||
/* Make a copy, mktime(3) modifies the tm struct. */
|
||||
#ifdef __ORCAC__
|
||||
/*
|
||||
* ORCA/C pukes with an "illegal operand for the indirection
|
||||
* operator" message
|
||||
*/
|
||||
memcpy(&tmp, t, sizeof(struct tm));
|
||||
#else
|
||||
tmp = *t;
|
||||
#endif
|
||||
s = mktime(&tmp);
|
||||
(void) sprintf(buf, "%ld", s);
|
||||
return _add(buf, pt, ptlim);
|
||||
|
@ -497,6 +517,8 @@ _add(str, pt, ptlim)
|
|||
return pt;
|
||||
}
|
||||
|
||||
#if 0 /* we don't seem to need this yet, so don't build it; it's untested */
|
||||
|
||||
extern char *_PathLocale;
|
||||
|
||||
int
|
||||
|
@ -607,6 +629,12 @@ no_locale:
|
|||
* setlocale() assumes that we left the old locale alone.
|
||||
*/
|
||||
locale_buf = locale_buf_C;
|
||||
#ifdef __ORCAC__
|
||||
memcpy(&localebuf, &C_time_locale, sizeof(struct lc_time_T));
|
||||
#else
|
||||
localebuf = C_time_locale;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
|
4
paths.mk
4
paths.mk
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
# Devin Reade, 1997
|
||||
#
|
||||
# $Id: paths.mk,v 1.11 1999/03/19 05:53:31 gdr-ftp Exp $
|
||||
# $Id: paths.mk,v 1.12 2012/08/26 02:54:58 gdr Exp $
|
||||
#
|
||||
|
||||
# This one isn't really a path, but it affects the creation of path
|
||||
|
@ -33,7 +33,7 @@ PRODOS_OBJS = true
|
|||
#
|
||||
# To turn this off, completely comment it out; don't just change the value.
|
||||
|
||||
# APPLESHARE_CASE_SENSITIVE = true
|
||||
APPLESHARE_CASE_SENSITIVE = true
|
||||
|
||||
# SRC_DIR is the top-level GNO source distribution directory (containing
|
||||
# $(SRC_DIR)/gno, $(SRC_DIR)/gno/lib, and so forth). It also corresponds
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* static char rcsid[] = "$Header: /nobackup/gdr/copy-of-cvs-from-tekarra/gno/usr.bin/cal/cal.c,v 1.1 1998/03/09 15:29:53 gdr-ftp Exp $";
|
||||
/*
|
||||
|
||||
#ifdef __ORCAC__
|
||||
#pragma stacksize 1024
|
||||
|
|
|
@ -46,6 +46,26 @@ extern char reply_string[];
|
|||
char *mname;
|
||||
jmp_buf jabort;
|
||||
|
||||
/*
|
||||
* Toggle a variable
|
||||
*/
|
||||
int togglevar(int argc, char ** argv, int *var, const char *mesg)
|
||||
{
|
||||
if (argc < 2) {
|
||||
*var = !*var;
|
||||
} else if (argc == 2 && strcasecmp(argv[1], "on") == 0) {
|
||||
*var = 1;
|
||||
} else if (argc == 2 && strcasecmp(argv[1], "off") == 0) {
|
||||
*var = 0;
|
||||
} else {
|
||||
printf("usage: %s [ on | off ]\n", argv[0]);
|
||||
return (-1);
|
||||
}
|
||||
if (mesg)
|
||||
printf("%s %s.\n", mesg, onoff(*var));
|
||||
return (*var);
|
||||
}
|
||||
|
||||
/*
|
||||
* `Another' gets another argument, and stores the new argc and argv.
|
||||
* It reverts to the top level (via main.c's intr()) on EOF/error.
|
||||
|
@ -830,9 +850,7 @@ int i;
|
|||
/*VARARGS*/
|
||||
void setbell (int argc, char **argv)
|
||||
{
|
||||
bell = !bell;
|
||||
printf("Bell mode %s.\n", onoff(bell));
|
||||
code = bell;
|
||||
code = togglevar(argc, argv, &bell, "Bell mode");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -841,9 +859,7 @@ void setbell (int argc, char **argv)
|
|||
/*VARARGS*/
|
||||
void settrace (int argc, char **argv)
|
||||
{
|
||||
trace = !trace;
|
||||
printf("Packet tracing %s.\n", onoff(trace));
|
||||
code = trace;
|
||||
code = togglevar(argc, argv, &trace, "Packet tracing");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -866,9 +882,7 @@ void sethash (int argc, char **argv)
|
|||
/*VARARGS*/
|
||||
void setverbose (int argc, char **argv)
|
||||
{
|
||||
verbose = !verbose;
|
||||
printf("Verbose mode %s.\n", onoff(verbose));
|
||||
code = verbose;
|
||||
code = togglevar(argc, argv, &verbose, "Verbose mode");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -877,9 +891,7 @@ void setverbose (int argc, char **argv)
|
|||
/*VARARGS*/
|
||||
void setport (int argc, char **argv)
|
||||
{
|
||||
sendport = !sendport;
|
||||
printf("Use of PORT cmds %s.\n", onoff(sendport));
|
||||
code = sendport;
|
||||
code = togglevar(argc, argv, &sendport, "Use of PORT cmds");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -889,9 +901,7 @@ void setport (int argc, char **argv)
|
|||
/*VARARGS*/
|
||||
void setprompt (int argc, char **argv)
|
||||
{
|
||||
interactive = !interactive;
|
||||
printf("Interactive mode %s.\n", onoff(interactive));
|
||||
code = interactive;
|
||||
code = togglevar(argc, argv, &interactive, "Interactive mode");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -901,9 +911,7 @@ void setprompt (int argc, char **argv)
|
|||
/*VARARGS*/
|
||||
void setglob (int argc, char **argv)
|
||||
{
|
||||
doglob = !doglob;
|
||||
printf("Globbing %s.\n", onoff(doglob));
|
||||
code = doglob;
|
||||
code = togglevar(argc, argv, &doglob, "Globbing");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -979,6 +987,18 @@ static char buf[MAXPATHLEN];
|
|||
code = 0;
|
||||
}
|
||||
|
||||
void lpwd(int argc, char **argv)
|
||||
{
|
||||
static char buf[MAXPATHLEN];
|
||||
|
||||
if (getcwd(buf, sizeof(buf)) != NULL)
|
||||
printf("Local directory %s\n", buf);
|
||||
else
|
||||
fprintf(stderr, "getcwd: %s\n", strerror(errno));
|
||||
code = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Delete a single file.
|
||||
*/
|
||||
|
@ -1844,18 +1864,20 @@ LOOP:
|
|||
return(new);
|
||||
}
|
||||
|
||||
void setpassive(int argc, char **argv)
|
||||
{
|
||||
code = togglevar(argc, argv, &passivemode,
|
||||
verbose ? "Passive mode" : (char *)NULL);
|
||||
}
|
||||
|
||||
void setsunique (int argc, char **argv)
|
||||
{
|
||||
sunique = !sunique;
|
||||
printf("Store unique %s.\n", onoff(sunique));
|
||||
code = sunique;
|
||||
code = togglevar(argc, argv, &sunique, "Store unique");
|
||||
}
|
||||
|
||||
void setrunique (int argc, char **argv)
|
||||
{
|
||||
runique = !runique;
|
||||
printf("Receive unique %s.\n", onoff(runique));
|
||||
code = runique;
|
||||
code = togglevar(argc, argv, &runique, "Receive unique");
|
||||
}
|
||||
|
||||
/* change directory to perent directory */
|
||||
|
|
|
@ -10,6 +10,7 @@ void setbell (int argc, char **argv);
|
|||
void settrace (int argc, char **argv);
|
||||
void sethash (int argc, char **argv);
|
||||
void setverbose (int argc, char **argv);
|
||||
void setpassive (int argc, char **argv);
|
||||
void setport (int argc, char **argv);
|
||||
void setprompt (int argc, char **argv);
|
||||
void setglob (int argc, char **argv);
|
||||
|
@ -45,6 +46,7 @@ void mget (int argc, char **argv);
|
|||
void status (int argc, char **argv);
|
||||
void cd (int argc, char **argv);
|
||||
void lcd (int argc, char **argv);
|
||||
void lpwd (int argc, char **argv);
|
||||
void delete (int argc, char **argv);
|
||||
void mdelete (int argc, char **argv);
|
||||
void renamefile (int argc, char **argv);
|
||||
|
|
|
@ -34,6 +34,7 @@ char hashhelp[] = "toggle printing `#' for each buffer transferred";
|
|||
char helphelp[] = "print local help information";
|
||||
char idlehelp[] = "get (set) idle timer on remote side";
|
||||
char lcdhelp[] = "change local working directory";
|
||||
char lpwdhelp[] = "print local working directory";
|
||||
char lshelp[] = "list contents of remote directory";
|
||||
char macdefhelp[] = "define a macro";
|
||||
char mdeletehelp[] = "delete multiple files";
|
||||
|
@ -48,6 +49,7 @@ char newerhelp[] = "get file if remote file is newer than local file ";
|
|||
char nlisthelp[] = "nlist contents of remote directory";
|
||||
char nmaphelp[] = "set templates for default file name mapping";
|
||||
char ntranshelp[] = "set translation table for default file name mapping";
|
||||
char passivehelp[] = "enter passive transfer mode";
|
||||
char porthelp[] = "toggle use of PORT cmd for each data connection";
|
||||
char prompthelp[] = "force interactive prompting on multiple commands";
|
||||
char proxyhelp[] = "issue command on alternate connection";
|
||||
|
@ -105,6 +107,7 @@ struct cmd cmdtab[] = {
|
|||
{ "idle", idlehelp, 0, 1, 1, idle },
|
||||
{ "image", binaryhelp, 0, 1, 1, setbinary },
|
||||
{ "lcd", lcdhelp, 0, 0, 0, lcd },
|
||||
{ "lpwd", lpwdhelp, 0, 0, 0, lpwd },
|
||||
{ "ls", lshelp, 1, 1, 1, ls },
|
||||
{ "macdef", macdefhelp, 0, 0, 0, macdef },
|
||||
{ "mdelete", mdeletehelp, 1, 1, 1, mdelete },
|
||||
|
@ -120,6 +123,7 @@ struct cmd cmdtab[] = {
|
|||
{ "nlist", nlisthelp, 1, 1, 1, ls },
|
||||
{ "ntrans", ntranshelp, 0, 0, 1, setntrans },
|
||||
{ "open", connecthelp, 0, 0, 1, setpeer },
|
||||
{ "passive", passivehelp, 0, 0, 0, setpassive },
|
||||
{ "prompt", prompthelp, 0, 0, 0, setprompt },
|
||||
{ "proxy", proxyhelp, 0, 0, 1, doproxy },
|
||||
{ "sendport", porthelp, 0, 0, 0, setport },
|
||||
|
|
|
@ -974,6 +974,64 @@ int initconn (void)
|
|||
unsigned char *p, *a;
|
||||
int result, len, tmpno = 0;
|
||||
int on = 1;
|
||||
int a1,a2,a3,a4,p1,p2;
|
||||
|
||||
if (passivemode) {
|
||||
data = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (data < 0) {
|
||||
perror("ftp: socket");
|
||||
return(1);
|
||||
}
|
||||
if (options & SO_DEBUG &&
|
||||
setsockopt(data, SOL_SOCKET, SO_DEBUG, (char *)&on,
|
||||
sizeof (on)) < 0)
|
||||
perror("ftp: setsockopt (ignored)");
|
||||
if (command("PASV") != COMPLETE) {
|
||||
printf("Passive mode refused.\n");
|
||||
return(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* What we've got at this point is a string of comma separated
|
||||
* one-byte unsigned integer values, separated by commas.
|
||||
* The first four are the an IP address. The fifth is the MSB
|
||||
* of the port number, the sixth is the LSB. From that we'll
|
||||
* prepare a sockaddr_in.
|
||||
*/
|
||||
|
||||
if (sscanf(pasv,"%d,%d,%d,%d,%d,%d",&a1,&a2,&a3,&a4,&p1,&p2)
|
||||
!= 6) {
|
||||
printf("Passive mode address scan failure. Shouldn't happen!\n");
|
||||
return(1);
|
||||
};
|
||||
|
||||
data_addr.sin_family = AF_INET;
|
||||
#ifdef __GNO__
|
||||
// s_addr is a 32-bit value which overflows the
|
||||
// int shift.
|
||||
data_addr.sin_addr.S_un.S_un_b.s_b1 = a1;
|
||||
data_addr.sin_addr.S_un.S_un_b.s_b2 = a2;
|
||||
data_addr.sin_addr.S_un.S_un_b.s_b3 = a3;
|
||||
data_addr.sin_addr.S_un.S_un_b.s_b4 = a4;
|
||||
#else
|
||||
data_addr.sin_addr.s_addr = htonl((a1 << 24) | (a2 << 16) |
|
||||
(a3 << 8) | a4);
|
||||
#endif
|
||||
data_addr.sin_port = htons((p1 << 8) | p2);
|
||||
|
||||
if (connect(data, (struct __SOCKADDR *) &data_addr, sizeof(data_addr)) < 0) {
|
||||
perror("ftp: connect");
|
||||
return(1);
|
||||
}
|
||||
|
||||
#if defined(IP_TOS) && defined(IPTOS_THROUGHPUT)
|
||||
on = IPTOS_THROUGHPUT;
|
||||
if (setsockopt(data, IPPROTO_IP, IP_TOS, (char *)&on,
|
||||
sizeof(int)) < 0)
|
||||
perror("ftp: setsockopt TOS (ignored)");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
noport:
|
||||
data_addr = myctladdr;
|
||||
|
@ -1042,6 +1100,9 @@ FILE *dataconn (char *lmode)
|
|||
struct sockaddr_in from;
|
||||
int s, fromlen = sizeof (from), tos;
|
||||
|
||||
if (passivemode)
|
||||
return (fdopen(data, lmode));
|
||||
|
||||
s = accept(data, (struct __SOCKADDR *) &from, &fromlen);
|
||||
if (s < 0) {
|
||||
perror("ftp: accept");
|
||||
|
|
|
@ -61,6 +61,7 @@ extern int mapflag; /* use mapin mapout templates on file names */
|
|||
extern int code; /* return/reply code for ftp command */
|
||||
extern int crflag; /* if 1, strip car. rets. on ascii gets */
|
||||
extern char pasv[64]; /* passive port for proxy data connection */
|
||||
extern int passivemode; /* passive mode enabled */
|
||||
extern char *altarg; /* argv[1] with no shell-like preprocessing */
|
||||
extern char ntin[17]; /* input translation table */
|
||||
extern char ntout[17]; /* output translation table */
|
||||
|
|
|
@ -53,6 +53,7 @@ static char homedir[MAXPATHLEN];
|
|||
doglob = 1;
|
||||
interactive = 1;
|
||||
autologin = 1;
|
||||
passivemode = 1;
|
||||
argc--, argv++;
|
||||
while (argc > 0 && **argv == '-') {
|
||||
for (cp = *argv + 1; *cp; cp++)
|
||||
|
|
|
@ -153,6 +153,17 @@ int permit_passwd = 0;
|
|||
* -f is used to skip a second login authentication
|
||||
* -h is used by other servers to pass the name of the remote
|
||||
* host to login so that it may be placed in utmp and wtmp
|
||||
*
|
||||
* The TMTerm NDA expects the GNO 2.0.4 multi-user update login.
|
||||
* The commandline passed is:
|
||||
* login -Ph TMTERM root TERM=vt100
|
||||
*
|
||||
* -P Suppress the password prompt and log the user in without one.
|
||||
* This switch will have no effect unless a user name is given on
|
||||
* the command line and the user has root priviledges or is logging
|
||||
* in as himself.
|
||||
*
|
||||
* this is equivalent to -f
|
||||
*/
|
||||
*full_hostname = '\0';
|
||||
domain = NULL;
|
||||
|
@ -163,8 +174,11 @@ int permit_passwd = 0;
|
|||
|
||||
fflag = hflag = pflag = 0;
|
||||
uid = getuid();
|
||||
while ((ch = getopt(argc, argv, "fh:p")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "fh:pP")) != EOF)
|
||||
switch (ch) {
|
||||
#ifdef __GNO__
|
||||
case 'P':
|
||||
#endif
|
||||
case 'f':
|
||||
fflag = 1;
|
||||
break;
|
||||
|
@ -181,6 +195,7 @@ int permit_passwd = 0;
|
|||
case 'p':
|
||||
pflag = 1;
|
||||
break;
|
||||
|
||||
case '?':
|
||||
default:
|
||||
if (!uid)
|
||||
|
@ -430,6 +445,15 @@ int permit_passwd = 0;
|
|||
/* Destroy environment unless user has requested its preservation. */
|
||||
if (!pflag)
|
||||
environ = envinit;
|
||||
|
||||
#ifdef __GNO__
|
||||
// set parameters from the command line.
|
||||
for (cnt = 1; cnt < argc; ++cnt)
|
||||
{
|
||||
(void)putenv(argv[cnt]);
|
||||
}
|
||||
#endif
|
||||
|
||||
(void)setenv("HOME", pwd->pw_dir, 1);
|
||||
(void)setenv("SHELL", pwd->pw_shell, 1);
|
||||
if (term[0] == '\0')
|
||||
|
|
|
@ -36,7 +36,6 @@ static char sccsid[] = "@(#)krcmd.c 8.1 (Berkeley) 6/6/93";
|
|||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
* $Source: /nobackup/gdr/copy-of-cvs-from-tekarra/gno/usr.bin/rlogin/krcmd.c,v $
|
||||
* $Header: /mit/kerberos/ucb/mit/kcmd/RCS/krcmd.c,v 5.1
|
||||
* 89/07/25 15:38:44 kfall Exp Locker: kfall $
|
||||
* static char *rcsid_kcmd_c =
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* newuser - add a new user to the system -- James Brookes
|
||||
*
|
||||
* $Id: newuser.c,v 1.3 1999/02/15 00:22:11 gdr-ftp Exp $
|
||||
* $Id: newuser.c,v 1.4 2012/08/26 02:54:59 gdr Exp $
|
||||
*
|
||||
* Changes for version 1.2 (Modifications by Devin Reade)
|
||||
* - account home directories are now made in /home rather than /user
|
||||
|
@ -503,7 +503,7 @@ main (int argc, char **argv)
|
|||
acct_name, pass1, uid, gid, name, HOME, acct_name, DEFAULT_SHELL);
|
||||
fclose(FOutPtr);
|
||||
syslog(LOG_INFO, "created account %s pending validation", acct_name);
|
||||
printf("\nYour account will be available after the system administrator");
|
||||
printf("\nYour account will be available after the system administrator ");
|
||||
printf("has had a\nchance to review it.\n");
|
||||
}
|
||||
closelog();
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#
|
||||
# $Id: Makefile,v 1.2 1998/10/31 19:02:47 gdr-ftp Exp $
|
||||
# $Id: Makefile,v 1.3 2012/08/26 02:54:59 gdr Exp $
|
||||
#
|
||||
|
||||
PROG = syslogd
|
||||
MAIN = syslogd2
|
||||
SRCS = syslogd2.c
|
||||
|
||||
CFLAGS += -D__STACK_CHECK__
|
||||
CFLAGS += -D__STACK_CHECK__ -v
|
||||
STACK = 4096
|
||||
BINDIR = /usr/sbin
|
||||
CHAPTER = 8
|
||||
|
|
|
@ -131,7 +131,8 @@ If a received message matches the specified
|
|||
.IR facility
|
||||
and is of the specified
|
||||
.IR level
|
||||
.IR (or "a higher level) ,"
|
||||
.BI ( or
|
||||
a higher level),
|
||||
and the first word in the message after the date matches the
|
||||
.IR program ,
|
||||
the action specified in the
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: syslogd.rez,v 1.2 1998/12/22 16:05:46 gdr-ftp Exp $
|
||||
* $Id: syslogd.rez,v 1.3 2012/08/26 02:55:00 gdr Exp $
|
||||
*/
|
||||
|
||||
#include "Types.Rez"
|
||||
|
@ -9,7 +9,7 @@ resource rVersion (0x1, purgeable3, nocrossbank) {
|
|||
|
||||
{ 2, 0, 0, /* version */
|
||||
alpha, /* development|alpha|beta|final|release */
|
||||
1 /* non-final release number */
|
||||
2 /* non-final release number */
|
||||
},
|
||||
verUS,
|
||||
"syslogd",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* have sufficient bits for the facility/priority values, and at the time
|
||||
* his sources weren't available for modification.
|
||||
*
|
||||
* $Id: syslogd2.c,v 1.1 1998/10/31 19:02:47 gdr-ftp Exp $
|
||||
* $Id: syslogd2.c,v 1.2 2012/08/26 02:55:00 gdr Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,6 +27,9 @@
|
|||
* set up so that we can't get interrupted by SIGHUP or SIGTERM
|
||||
* while we're in the SIGALRM handler.
|
||||
* - should logInternal be using the internal "none" priority?
|
||||
* - logMessage should be modified to ensure that there is a trailing
|
||||
* newline. Internal messages (at least) via logInternal are currently
|
||||
* missing newlines.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -71,10 +74,14 @@
|
|||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <memory.h>
|
||||
#include <misctool.h>
|
||||
#ifdef __STACK_CHECK__
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <ctype.h> /* debugging only */
|
||||
#include "syslogd.h"
|
||||
|
||||
#ifndef EOF
|
||||
#define EOF (-1)
|
||||
|
@ -85,8 +92,7 @@
|
|||
#if 0
|
||||
static void die (const char *message);
|
||||
#endif
|
||||
static int logMessage (long facpri, char *msg, int len);
|
||||
static void logInternal (const char *message, ...);
|
||||
static int logMessage (int facpri, char *msg, int len);
|
||||
static int writeConsole (const char *buf, size_t size);
|
||||
#if 0
|
||||
static void handle_HUP (int sig, int code);
|
||||
|
@ -99,17 +105,25 @@ char MessageBuffer[_SYSLOG_BUFFERLEN];
|
|||
int MessageBufferLen = 0; /* number of used chars in MessageBuffer */
|
||||
int bytesToCopy;
|
||||
|
||||
long FacPri; /* facility/priorty */
|
||||
int FacPri; /* facility/priorty */
|
||||
time_t Now;
|
||||
|
||||
char * LogFile = NULL; /* temporary kludge */
|
||||
int LogConsole = 0; /* temporary kludge */
|
||||
|
||||
static void handleVersionZero (SyslogDataBuffer0_t *dataptr0);
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int fd, ch;
|
||||
SyslogDataBuffer_t *dataptr;
|
||||
int fd, ch, isVersionZero;
|
||||
union {
|
||||
SyslogDataBuffer0_t *v0;
|
||||
SyslogDataBuffer_t *vN;
|
||||
} datap;
|
||||
char *p, *q;
|
||||
Handle datahandle;
|
||||
Word oldID, myID;
|
||||
|
||||
#ifdef DEBUG
|
||||
int loopcount = 0;
|
||||
#endif
|
||||
|
@ -120,9 +134,12 @@ main(int argc, char **argv) {
|
|||
* to have to call atexit() since we may be in a signal handler
|
||||
* when we have to die.
|
||||
*/
|
||||
_beginStackCheck();
|
||||
_beginStackCheck();
|
||||
#endif
|
||||
|
||||
/* We'll be needing our mem mgr ID later ... */
|
||||
myID = _getUserID();
|
||||
|
||||
while ((ch = getopt(argc, argv, "cF:")) != EOF) {
|
||||
switch(ch) {
|
||||
case 'c':
|
||||
|
@ -142,6 +159,7 @@ main(int argc, char **argv) {
|
|||
char *myname;
|
||||
myname = __prognameGS();
|
||||
writeConsole(argv[0], strlen(argv[0]));
|
||||
writeConsole("/", 1);
|
||||
writeConsole(myname, strlen(myname));
|
||||
}
|
||||
#endif
|
||||
|
@ -180,10 +198,27 @@ main(int argc, char **argv) {
|
|||
logInternal("couldn't create port: %s", strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
logInternal("DEBUG: got port %d", Port);
|
||||
#undef __SYSLOG_PORT_NAME
|
||||
#define __SYSLOG_PORT_NAME "syslogd_test"
|
||||
|
||||
if (pbind (Port, __SYSLOG_PORT_NAME) == -1) {
|
||||
#if 0
|
||||
logInternal("DEBUG: Bound port first time");
|
||||
/* KLUDGE KLUDGE KLUDGE
|
||||
* Kill off the old v1 syslogd
|
||||
*/
|
||||
kill(3, SIGTERM);
|
||||
sleep(1);
|
||||
if (pbind(Port, __SYSLOG_PORT_NAME) == -1) {
|
||||
#endif
|
||||
logInternal("couldn't bind port: %s", strerror(errno));
|
||||
exit(1);
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
}
|
||||
logInternal("DEBUG: bound to port");
|
||||
|
||||
/* now loop forever waiting for messages */
|
||||
for (;;) {
|
||||
|
@ -198,14 +233,87 @@ main(int argc, char **argv) {
|
|||
}
|
||||
#endif
|
||||
|
||||
logInternal("Entering loop");
|
||||
|
||||
/* block until a message comes in */
|
||||
dataptr = (SyslogDataBuffer_t *) preceive(Port);
|
||||
datahandle = (Handle) preceive(Port);
|
||||
|
||||
/* paranoia */
|
||||
if (datahandle == NULL) {
|
||||
logInternal("Received NULL pointer. Discarded.");
|
||||
continue;
|
||||
}
|
||||
CheckHandle(datahandle);
|
||||
if (_toolErr) {
|
||||
if (_toolErr == handleErr) {
|
||||
logInternal("invalid handle 0x%lx: message dropped",
|
||||
(unsigned long) datahandle);
|
||||
} else {
|
||||
logInternal("CheckHandle on 0x%lx failed with code %d",
|
||||
(unsigned long) datahandle,
|
||||
_toolErr);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Change the memory block to be owned by our ID */
|
||||
oldID = SetHandleID(myID, datahandle);
|
||||
|
||||
/* lock the handle */
|
||||
HLock(datahandle);
|
||||
if (_toolErr) {
|
||||
logInternal("HLock on 0x%lx failed with code %d",
|
||||
(unsigned long) datahandle, _toolErr);
|
||||
}
|
||||
|
||||
/* , and
|
||||
* free up the old ID
|
||||
*/
|
||||
|
||||
{
|
||||
int *iptr, j;
|
||||
char *cptr, c;
|
||||
|
||||
iptr = (int *) *datahandle;
|
||||
cptr = (char *) &iptr[5];
|
||||
logInternal("buffer: %d %d %d %d %d:\r",
|
||||
iptr[0], iptr[1], iptr[2], iptr[3], iptr[4]);
|
||||
for (j=0; j<iptr[4]; j++) {
|
||||
c = cptr[j];
|
||||
logInternal("GSString[%d] = 0x%x '%c'",
|
||||
j, (int) c, isprint(c) ? c : '?');
|
||||
}
|
||||
continue;
|
||||
}
|
||||
#ifdef BORK
|
||||
/* dereference the handle */
|
||||
datap.vN = (SyslogDataBuffer_t *) *datahandle;
|
||||
|
||||
/* determine if it's an old version zero message */
|
||||
isVersionZero = (datap.v0->sdb0_version == 0);
|
||||
|
||||
if (isVersionZero) {
|
||||
handleVersionZero(datap.v0);
|
||||
HUnlock(datahandle); /* ignore errors */
|
||||
|
||||
continue;
|
||||
} else {
|
||||
DeleteID (oldID);
|
||||
logInternal("not version zero");
|
||||
HUnlock(datahandle); /* ignore errors */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isVersionZero) {
|
||||
FacPri = datap.v0->sdb0_prio;
|
||||
} else {
|
||||
|
||||
/* verify that this isn't a garbage pointer */
|
||||
if (dataptr->sdb_magic != _SYSLOG_MAGIC) {
|
||||
if (datap.vN->sdb_magic != _SYSLOG_MAGIC) {
|
||||
logInternal("Bad magic number 0x%X; message "
|
||||
"discarded. Caller may hang.",
|
||||
dataptr->sdb_magic);
|
||||
datap.vN->sdb_magic);
|
||||
HUnlock(datahandle); /* ignore errors */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -213,11 +321,12 @@ main(int argc, char **argv) {
|
|||
* Do the library and daemon agree on the format of the
|
||||
* SyslogDataBuffer_t structure?
|
||||
*/
|
||||
if (dataptr->sdb_version != _SYSLOG_STRUCT_VERSION) {
|
||||
if (datap.vN->sdb_version != _SYSLOG_STRUCT_VERSION) {
|
||||
logInternal("Message version mismatch. Expected %d "
|
||||
"got %d. Message discarded. Caller may hang.",
|
||||
_SYSLOG_STRUCT_VERSION,
|
||||
dataptr->sdb_version);
|
||||
datap.vN->sdb_version);
|
||||
HUnlock(datahandle); /* ignore errors */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -230,8 +339,8 @@ main(int argc, char **argv) {
|
|||
* This should be changed so that we immediately copy the
|
||||
* buffer and any other required info, then release the caller.
|
||||
*/
|
||||
p = dataptr->sdb_buffer;
|
||||
bytesToCopy = dataptr->sdb_msglen;
|
||||
p = datap.vN->sdb_buffer;
|
||||
bytesToCopy = datap.vN->sdb_msglen;
|
||||
if (*p == '<') {
|
||||
p++;
|
||||
FacPri = strtol(p, &q, 10);
|
||||
|
@ -243,10 +352,12 @@ main(int argc, char **argv) {
|
|||
} else {
|
||||
p = q;
|
||||
}
|
||||
bytesToCopy -= (p - dataptr->sdb_buffer);
|
||||
bytesToCopy -= (p - datap.vN->sdb_buffer);
|
||||
} else {
|
||||
FacPri = LOG_MAKEPRI(LOG_USER, LOG_NOTICE);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* At this point, p points the point in the caller's buffer
|
||||
* where we should start copying bytes. bytesToCopy
|
||||
|
@ -256,7 +367,7 @@ main(int argc, char **argv) {
|
|||
* If the 'needtime' flag is set, we now copy a time stamp
|
||||
* into our own buffer (the user's buffer is untouched).
|
||||
*/
|
||||
if (dataptr->sdb_needtime) {
|
||||
if (datap.vN->sdb_needtime) {
|
||||
time(&Now);
|
||||
q = ctime(&Now) + 4;
|
||||
q[16] = '\0';
|
||||
|
@ -303,16 +414,40 @@ main(int argc, char **argv) {
|
|||
* See the comments in the syslog(3) code as to why we do
|
||||
* it with a busy-wait.
|
||||
*/
|
||||
dataptr->sdb_busywait = 0;
|
||||
datap.vN->sdb_busywait = 0;
|
||||
|
||||
/* print the message */
|
||||
logMessage(FacPri, MessageBuffer, MessageBufferLen);
|
||||
#endif /* BORK */
|
||||
}
|
||||
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
handleVersionZero (SyslogDataBuffer0_t *dataptr0)
|
||||
{
|
||||
int *offset; /* offset from dataptr0 of current string */
|
||||
int *length;
|
||||
char *string;
|
||||
|
||||
if (dataptr0->sdb0_numstrings == 0) {
|
||||
logInternal("[zero length message]");
|
||||
return;
|
||||
}
|
||||
offset = (int *) ((char *) dataptr0 + sizeof(SyslogDataBuffer0_t));
|
||||
length = (int *) ((char *) dataptr0 + *offset);
|
||||
string = ((char *) length) + sizeof(int);
|
||||
|
||||
logMessage(dataptr0->sdb0_prio, string, *length);
|
||||
if (dataptr0->sdb0_numstrings > 1) {
|
||||
logInternal("Cannot handle multiple strings. Last %d ignored",
|
||||
dataptr0->sdb0_numstrings -1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Print the message <msg> of length <len> to the relevent files based on
|
||||
* the facility/priority value <facpri>.
|
||||
|
@ -325,7 +460,7 @@ main(int argc, char **argv) {
|
|||
* LogFile (temporary kludge)
|
||||
*/
|
||||
static int
|
||||
logMessage (long facpri, const char *msg, int len) {
|
||||
logMessage (int facpri, const char *msg, int len) {
|
||||
int result = 0;
|
||||
|
||||
if (LogConsole) {
|
||||
|
@ -427,7 +562,7 @@ writeConsole (const char *buf, size_t size) {
|
|||
#pragma optimize 78
|
||||
#pragma debug 0
|
||||
|
||||
static void
|
||||
void
|
||||
logInternal (const char *message, ...) {
|
||||
#define BUFFER_SIZE 256
|
||||
static char buffer[BUFFER_SIZE];
|
||||
|
@ -444,11 +579,17 @@ logInternal (const char *message, ...) {
|
|||
p = ctime(&now) + 4;
|
||||
p[16] = '\0';
|
||||
p = sprintmt(buffer, BUFFER_SIZE, "%s syslogd[%d]: ", p, getpid());
|
||||
#if 1
|
||||
p = vsprintmt(p, BUFFER_SIZE - (p - buffer), message, ap);
|
||||
#else
|
||||
p = vsprintmt(p, p - buffer, message, ap);
|
||||
|
||||
logMessage(LOG_MAKEPRI(LOG_DAEMON, LOG_CRIT), buffer, p - buffer);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* this is the one we *should* be using */
|
||||
logMessage(LOG_MAKEPRI(LOG_DAEMON, LOG_CRIT), buffer, p - buffer);
|
||||
#else
|
||||
/* for debugging only */
|
||||
if ((p - buffer) < BUFFER_SIZE) {
|
||||
*p++ = '\r';
|
||||
*p = '\0';
|
||||
|
|
182
verbatim/etc/services
Normal file
182
verbatim/etc/services
Normal file
|
@ -0,0 +1,182 @@
|
|||
#
|
||||
# Network services, Internet style
|
||||
#
|
||||
# Note that it is presently the policy of IANA to assign a single well-known
|
||||
# port number for both TCP and UDP; hence, most entries here have two entries
|
||||
# even if the protocol doesn't support UDP operations.
|
||||
# Updated from RFC 1340, ``Assigned Numbers'' (July 1992). Not all ports
|
||||
# are included, only the more common ones.
|
||||
#
|
||||
# $Id: services,v 1.9 1995/01/24 18:52:50 wollman Exp $
|
||||
# From: @(#)services 5.8 (Berkeley) 5/9/91
|
||||
#
|
||||
tcpmux 1/tcp # TCP port service multiplexer
|
||||
echo 7/tcp
|
||||
echo 7/udp
|
||||
discard 9/tcp sink null
|
||||
discard 9/udp sink null
|
||||
systat 11/tcp users
|
||||
daytime 13/tcp
|
||||
daytime 13/udp
|
||||
netstat 15/tcp
|
||||
qotd 17/tcp quote
|
||||
msp 18/tcp # message send protocol
|
||||
msp 18/udp # message send protocol
|
||||
chargen 19/tcp ttytst source
|
||||
chargen 19/udp ttytst source
|
||||
ftp 21/tcp
|
||||
# 22 - unassigned
|
||||
telnet 23/tcp
|
||||
# 24 - private
|
||||
smtp 25/tcp mail
|
||||
# 26 - unassigned
|
||||
time 37/tcp timserver
|
||||
time 37/udp timserver
|
||||
rlp 39/udp resource # resource location
|
||||
nameserver 42/tcp name # IEN 116
|
||||
whois 43/tcp nicname
|
||||
domain 53/tcp nameserver # name-domain server
|
||||
domain 53/udp nameserver
|
||||
mtp 57/tcp # deprecated
|
||||
bootps 67/tcp # BOOTP server
|
||||
bootps 67/udp
|
||||
bootpc 68/tcp # BOOTP client
|
||||
bootpc 68/udp
|
||||
tftp 69/udp
|
||||
gopher 70/tcp # Internet Gopher
|
||||
gopher 70/udp
|
||||
rje 77/tcp netrjs
|
||||
finger 79/tcp
|
||||
www 80/tcp http # WorldWideWeb HTTP
|
||||
www 80/udp # HyperText Transfer Protocol
|
||||
link 87/tcp ttylink
|
||||
#kerberos 88/tcp krb5 # Kerberos v5
|
||||
#kerberos 88/udp
|
||||
supdup 95/tcp
|
||||
# 100 - reserved
|
||||
hostnames 101/tcp hostname # usually from sri-nic
|
||||
iso-tsap 102/tcp tsap # part of ISODE.
|
||||
csnet-ns 105/tcp cso-ns # also used by CSO name server
|
||||
csnet-ns 105/udp cso-ns
|
||||
rtelnet 107/tcp # Remote Telnet
|
||||
rtelnet 107/udp
|
||||
pop2 109/tcp postoffice # POP version 2
|
||||
pop2 109/udp
|
||||
pop3 110/tcp # POP version 3
|
||||
pop3 110/udp
|
||||
sunrpc 111/tcp
|
||||
sunrpc 111/udp
|
||||
ident 113/tcp auth tap
|
||||
sftp 115/tcp
|
||||
uucp-path 117/tcp
|
||||
nntp 119/tcp readnews untp # USENET News Transfer Protocol
|
||||
ntp 123/tcp
|
||||
ntp 123/udp # Network Time Protocol
|
||||
netbios-ns 137/tcp # NETBIOS Name Service
|
||||
netbios-ns 137/udp
|
||||
netbios-dgm 138/tcp # NETBIOS Datagram Service
|
||||
netbios-dgm 138/udp
|
||||
netbios-ssn 139/tcp # NETBIOS session service
|
||||
netbios-ssn 139/udp
|
||||
imap2 143/tcp # Interim Mail Access Proto v2
|
||||
imap2 143/udp
|
||||
snmp 161/udp # Simple Net Mgmt Proto
|
||||
snmp-trap 162/udp snmptrap # Traps for SNMP
|
||||
cmip-man 163/tcp # ISO mgmt over IP (CMOT)
|
||||
cmip-man 163/udp
|
||||
cmip-agent 164/tcp
|
||||
cmip-agent 164/udp
|
||||
xdmcp 177/tcp # X Display Mgr. Control Proto
|
||||
xdmcp 177/udp
|
||||
nextstep 178/tcp NeXTStep NextStep # NeXTStep window
|
||||
nextstep 178/udp NeXTStep NextStep # server
|
||||
bgp 179/tcp # Border Gateway Proto.
|
||||
bgp 179/udp
|
||||
prospero 191/tcp # Cliff Neuman's Prospero
|
||||
prospero 191/udp
|
||||
irc 194/tcp # Internet Relay Chat
|
||||
irc 194/udp
|
||||
smux 199/tcp # SNMP Unix Multiplexer
|
||||
smux 199/udp
|
||||
at-rtmp 201/tcp # AppleTalk routing
|
||||
at-rtmp 201/udp
|
||||
at-nbp 202/tcp # AppleTalk name binding
|
||||
at-nbp 202/udp
|
||||
at-echo 204/tcp # AppleTalk echo
|
||||
at-echo 204/udp
|
||||
at-zis 206/tcp # AppleTalk zone information
|
||||
at-zis 206/udp
|
||||
z3950 210/tcp wais # NISO Z39.50 database
|
||||
z3950 210/udp wais
|
||||
ipx 213/tcp # IPX
|
||||
ipx 213/udp
|
||||
imap3 220/tcp # Interactive Mail Access
|
||||
imap3 220/udp # Protocol v3
|
||||
ulistserv 372/tcp # UNIX Listserv
|
||||
ulistserv 372/udp
|
||||
#
|
||||
# Berkeley-specific services
|
||||
#
|
||||
exec 512/tcp
|
||||
biff 512/udp comsat
|
||||
login 513/tcp
|
||||
who 513/udp whod
|
||||
shell 514/tcp cmd # no passwords used
|
||||
syslog 514/udp
|
||||
printer 515/tcp spooler # line printer spooler
|
||||
talk 517/udp
|
||||
ntalk 518/udp
|
||||
route 520/udp router routed # RIP
|
||||
timed 525/udp timeserver
|
||||
tempo 526/tcp newdate
|
||||
courier 530/tcp rpc
|
||||
conference 531/tcp chat
|
||||
netnews 532/tcp readnews
|
||||
netwall 533/udp # -for emergency broadcasts
|
||||
uucp 540/tcp uucpd # uucp daemon
|
||||
remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem
|
||||
#klogin 543/tcp # Kerberized `rlogin' (v5)
|
||||
#kshell 544/tcp # Kerberized `rsh' (v5)
|
||||
kerberos_master 751/tcp # Kerberos `kadmin' (v4)
|
||||
kerberos_master 751/udp # Kerberos `kadmin' (v4)
|
||||
kerberos-adm 749/tcp # Kerberos `kadmin' (v5)
|
||||
#
|
||||
webster 765/tcp # Network dictionary
|
||||
webster 765/udp
|
||||
#
|
||||
# From ``Assigned Numbers'':
|
||||
#
|
||||
#> The Registered Ports are not controlled by the IANA and on most systems
|
||||
#> can be used by ordinary user processes or programs executed by ordinary
|
||||
#> users.
|
||||
#
|
||||
#> Ports are used in the TCP [45,106] to name the ends of logical
|
||||
#> connections which carry long term conversations. For the purpose of
|
||||
#> providing services to unknown callers, a service contact port is
|
||||
#> defined. This list specifies the port used by the server process as its
|
||||
#> contact port. While the IANA can not control uses of these ports it
|
||||
#> does register or list uses of these ports as a convienence to the
|
||||
#> community.
|
||||
#
|
||||
ingreslock 1524/tcp
|
||||
ingreslock 1524/udp
|
||||
prospero-np 1525/tcp # Prospero non-privileged
|
||||
prospero-np 1525/udp
|
||||
rfe 5002/tcp # Radio Free Ethernet
|
||||
rfe 5002/udp # Actually uses UDP only
|
||||
#
|
||||
#
|
||||
# Kerberos (Project Athena/MIT) services
|
||||
# Note that these are for Kerberos v4, and are unofficial. Sites running
|
||||
# v4 should uncomment these and comment out the v5 entries above.
|
||||
#
|
||||
kerberos 750/udp kdc # Kerberos (server) udp
|
||||
kerberos 750/tcp kdc # Kerberos (server) tcp
|
||||
krbupdate 760/tcp kreg # Kerberos registration
|
||||
kpasswd 761/tcp kpwd # Kerberos "passwd"
|
||||
klogin 543/tcp # Kerberos rlogin
|
||||
eklogin 2105/tcp # Kerberos encrypted rlogin
|
||||
kshell 544/tcp krcmd # Kerberos remote shell
|
||||
#
|
||||
supfilesrv 871/tcp # for SUP
|
||||
supfiledbg 1127/tcp # for SUP
|
Loading…
Reference in New Issue
Block a user