Skip to content

Commit a022372

Browse files
author
Greg Brockman
committed
Added source for zsend
1 parent a4c4e67 commit a022372

12 files changed

Lines changed: 1375 additions & 0 deletions

File tree

‎bin/zsend‎

-35.3 KB
Binary file not shown.

‎src/zsend-0.0.1/Makefile‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
SHELL = /bin/sh
2+
3+
prefix=/usr
4+
exec_prefix=${prefix}
5+
datadir=${prefix}/share
6+
sysconfdir=${prefix}/etc
7+
sbindir=${exec_prefix}/sbin
8+
lsbindir=${sbindir}
9+
mandir=${prefix}/share/man
10+
11+
includedir=${prefix}/include
12+
libdir=${exec_prefix}/lib
13+
bindir=${exec_prefix}/bin
14+
15+
srcdir=
16+
top_srcdir=
17+
BUILDTOP=
18+
CC=gcc -m32
19+
INSTALL=/usr/bin/install -c
20+
21+
IRFLAGS=-DINTERREALM
22+
CPPFLAGS=-I/usr/athena/include
23+
CFLAGS=-g -O2
24+
ALL_CFLAGS=${CFLAGS} ${IRFLAGS} ${CPPFLAGS}
25+
LDFLAGS=-L${BUILDTOP}/lib
26+
#LIBS=-lreadline -L/usr/athena/lib -Wl,-R /usr/athena/lib -lzephyr -lkrb4 -lkrb5 -lcrypto -lcrypt -lresolv -lcom_err -ldl
27+
LIBS=-lreadline -L/usr/athena/lib -lzephyr -lkrb4 -lkrb5 -lcrypto -lcrypt -lresolv -lcom_err -ldl
28+
29+
OBJS= ZCkAuth.o lread.o
30+
31+
all: zsend
32+
33+
zsend.o: zsend.c
34+
35+
zsend: zsend.o lread.o lread.h ZCkAuth.o
36+
${CC} ${LDFLAGS} -o $@ ZCkAuth.o lread.o zsend.o ${LIBS}
37+
38+
.c.o:
39+
${CC} -c ${ALL_CFLAGS} $<
40+
41+
check:
42+
43+
install: zsend
44+
${INSTALL} -m 755 -s zsend ../../bin
45+
46+
clean:
47+
rm -f *.o zsend
48+
49+
.PHONY: all check install clean
50+

‎src/zsend-0.0.1/ZCkAuth.c‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/* Modifications for tzc by Darrell Kindred <dkindred@cmu.edu>, April 1997:
2+
* - cache the kerberos credentials, so we can continue to check auth
3+
* even if the user re-kinits.
4+
*/
5+
6+
/* This file is part of the Project Athena Zephyr Notification System.
7+
* It contains source for the ZCheckAuthentication function.
8+
*
9+
* Created by: Robert French
10+
*
11+
* /mit/zephyr/src/CVS/zephyr/lib/zephyr/ZCkAuth.c,v
12+
* ghudson
13+
*
14+
* Copyright (c) 1987,1991 by the Massachusetts Institute of Technology.
15+
* For copying and distribution information, see the file
16+
* "mit-copyright.h".
17+
*/
18+
/* /mit/zephyr/src/CVS/zephyr/lib/zephyr/ZCkAuth.c,v 1.21 1995/06/30 22:03:53 ghudson Exp */
19+
20+
21+
#if 0
22+
#include <internal.h>
23+
#else
24+
#include <zephyr/zephyr.h>
25+
#define ZAUTH_UNSET (-3) /* from internal.h */
26+
#include <stdio.h> /* for NULL */
27+
#endif
28+
29+
/* Check authentication of the notice.
30+
If it looks authentic but fails the Kerberos check, return -1.
31+
If it looks authentic and passes the Kerberos check, return 1.
32+
If it doesn't look authentic, return 0
33+
34+
When not using Kerberos, return true if the notice claims to be authentic.
35+
Only used by clients; the server uses its own routine.
36+
*/
37+
Code_t ZCheckAuthentication(notice, from)
38+
ZNotice_t *notice;
39+
struct sockaddr_in *from;
40+
{
41+
#ifdef ZEPHYR_USES_KERBEROS
42+
int result;
43+
ZChecksum_t our_checksum;
44+
static CREDENTIALS cred;
45+
static int got_cred = 0;
46+
47+
/* If the value is already known, return it. */
48+
if (notice->z_checked_auth != ZAUTH_UNSET)
49+
return (notice->z_checked_auth);
50+
51+
if (!notice->z_auth)
52+
return (ZAUTH_NO);
53+
54+
if (!got_cred &&
55+
(result = krb_get_cred(SERVER_SERVICE, SERVER_INSTANCE,
56+
__Zephyr_realm, &cred)) != 0)
57+
return (ZAUTH_NO);
58+
59+
got_cred = 1;
60+
61+
#ifdef NOENCRYPTION
62+
our_checksum = 0;
63+
#else /* NOENCRYPTION */
64+
our_checksum = des_quad_cksum(notice->z_packet, NULL,
65+
notice->z_default_format+
66+
strlen(notice->z_default_format)+1-
67+
notice->z_packet, 0, cred.session);
68+
#endif /* NOENCRYPTION */
69+
/* if mismatched checksum, then the packet was corrupted */
70+
return ((our_checksum == notice->z_checksum) ? ZAUTH_YES : ZAUTH_FAILED);
71+
72+
#else /* ZEPHYR_USES_KERBEROS */
73+
return (notice->z_auth ? ZAUTH_YES : ZAUTH_NO);
74+
#endif
75+
}

‎src/zsend-0.0.1/debian/changelog‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
zsend (0.0.1-1) stable; urgency=low
2+
3+
* Initial Release.
4+
5+
-- Aaron Solochek <aarons@aberrant.org> Sun, 09 Oct 2005 10:30:00 -0600
6+

‎src/zsend-0.0.1/debian/control‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Source: zsend
2+
Section: net
3+
Priority: optional
4+
Maintainer: Aaron Solochek <aarons@aberrant.org>
5+
Build-Depends: debhelper, bison, libzephyr-dev, libreadline-dev
6+
Standards-Version: 3.1.1
7+
8+
Package: zsend
9+
Section: net
10+
Architecture: any
11+
Depends: zephyr-clients, ${shlibs:Depends}
12+
Description: zsend is a stripped zwrite ideal for use in scripts
13+
.
14+
This package contains the zsend binary for use in zephyr notification
15+
scripts.

‎src/zsend-0.0.1/debian/copyright‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
This package was debianized by Aaron Solochek <aarons@aberrant.org> on
2+
Mon, 4 Dec 2000 05:28:22 -0500.
3+
4+
Copyright:
5+
6+
/*
7+
8+
Copyright 1987,1988,1995 by the Massachusetts Institute of Technology
9+
10+
All rights reserved.
11+
12+
Permission to use, copy, modify, and distribute this software and its
13+
documentation for any purpose and without fee is hereby granted,
14+
provided that the above copyright notice appear in all copies and that
15+
both that copyright notice and this permission notice appear in
16+
supporting documentation, and that the name of the Massachusetts
17+
Institute of Technology (M.I.T.) not be used in advertising or publicity
18+
pertaining to distribution of the software without specific, written
19+
prior permission.
20+
21+
M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
22+
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
23+
M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
24+
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
25+
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
26+
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
27+
SOFTWARE.
28+
29+
*/

‎src/zsend-0.0.1/debian/dirs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/bin

‎src/zsend-0.0.1/debian/rules‎

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#!/usr/bin/make -f
2+
# Sample debian/rules that uses debhelper.
3+
# GNU copyright 1997 by Joey Hess.
4+
#
5+
# This version is for a hypothetical package that builds an
6+
# architecture-dependant package, as well as an architecture-independent
7+
# package.
8+
9+
# Uncomment this to turn on verbose mode.
10+
#export DH_VERBOSE=1
11+
12+
# This is the debhelper compatability version to use.
13+
export DH_COMPAT=3
14+
15+
# This has to be exported to make some magic below work.
16+
export DH_OPTIONS
17+
SONAME=3
18+
19+
configure: configure-stamp
20+
configure-stamp:
21+
dh_testdir
22+
23+
# Add here commands to configure the package.
24+
-mkdir build-tree
25+
cp *.c build-tree/
26+
cp *.h build-tree/
27+
cp Makefile build-tree/
28+
29+
build: configure-stamp build-stamp
30+
build-stamp:
31+
dh_testdir
32+
33+
# Add here commands to compile the package.
34+
$(MAKE) -C `pwd`/build-tree
35+
touch build-stamp
36+
37+
clean:
38+
dh_testdir
39+
dh_testroot
40+
-rm -f build-stamp configure-stamp
41+
42+
# Add here commands to clean up after the build process.
43+
-rm -rf build-tree debian/tmp
44+
45+
dh_clean
46+
47+
install: DH_OPTIONS=
48+
install: build
49+
dh_testdir
50+
dh_testroot
51+
dh_clean -k
52+
-rm -rf debian/tmp
53+
dh_installdirs
54+
mkdir -p debian/tmp/usr/bin/
55+
56+
# Add here commands to install the package into debian/tmp.
57+
cd build-tree&&$(MAKE) DESTDIR=`pwd`/../debian/tmp install
58+
59+
60+
# Build architecture-independent files here.
61+
# Pass -i to all debhelper commands in this target to reduce clutter.
62+
binary-indep: build install
63+
64+
65+
# Build architecture-dependent files here.
66+
# Pass -a to all debhelper commands in this target to reduce clutter.
67+
binary-arch: build install
68+
dh_testdir
69+
dh_testroot
70+
set -e; \
71+
dh_movefiles -pzsend
72+
dh_movefiles --sourcedir=debian/tmp -pzsend
73+
dh_installdebconf
74+
dh_installdocs
75+
dh_installchangelogs
76+
dh_strip
77+
dh_compress
78+
dh_fixperms
79+
dh_makeshlibs
80+
dh_shlibdeps
81+
dh_installdeb
82+
dh_gencontrol
83+
dh_md5sums
84+
dh_builddeb
85+
86+
binary: binary-indep binary-arch
87+
88+
.PHONY: build clean binary-indep binary-arch binary install configure
89+
90+

‎src/zsend-0.0.1/debian/zsend.files‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/bin

0 commit comments

Comments
 (0)