diff options
| author | Theodore Tso <tytso@mit.edu> | 1993-12-01 22:52:41 +0000 |
|---|---|---|
| committer | Theodore Tso <tytso@mit.edu> | 1993-12-01 22:52:41 +0000 |
| commit | dc3474df68f378af23e51bda4d4b4f2fb95cbeb9 (patch) | |
| tree | 016424dbad722d026aa62030ae5a4ad031ff6d9b /src | |
| parent | 26b447d40f60d9db100ebce4d6e46cff7400790a (diff) | |
| download | krb5-dc3474df68f378af23e51bda4d4b4f2fb95cbeb9.tar.gz krb5-dc3474df68f378af23e51bda4d4b4f2fb95cbeb9.tar.xz krb5-dc3474df68f378af23e51bda4d4b4f2fb95cbeb9.zip | |
Separate out SAMPLE_SERVICE (the Kerberos service name) and SAMPLE_PORT
the TCP/IP port to look up in /etc/services. They are two separate concept
which should have separate defines.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3070 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/appl/sample/sample.h | 1 | ||||
| -rw-r--r-- | src/appl/sample/sclient/sclient.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/appl/sample/sample.h b/src/appl/sample/sample.h index d5801f1c8..7bb299f21 100644 --- a/src/appl/sample/sample.h +++ b/src/appl/sample/sample.h @@ -31,6 +31,7 @@ #define KRB5_SAMPLE__ #define SAMPLE_SERVICE "sample" +#define SAMPLE_PORT "sample" #define SAMPLE_VERSION "KRB5_sample_protocol_v1.0" #endif /* KRB5_SAMPLE__ */ diff --git a/src/appl/sample/sclient/sclient.c b/src/appl/sample/sclient/sclient.c index 753883436..32ade2617 100644 --- a/src/appl/sample/sclient/sclient.c +++ b/src/appl/sample/sclient/sclient.c @@ -87,11 +87,11 @@ char *argv[]; sin.sin_port = htons(atoi(argv[2])); } else { /* find the port number for knetd */ - sp = getservbyname(SAMPLE_SERVICE, "tcp"); + sp = getservbyname(SAMPLE_PORT, "tcp"); if (!sp) { fprintf(stderr, "unknown service %s/tcp; check /etc/services\n", - SAMPLE_SERVICE); + SAMPLE_PORT); exit(1); } /* copy the port number */ |
