diff options
| author | Tom Yu <tlyu@mit.edu> | 2009-10-31 00:48:38 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2009-10-31 00:48:38 +0000 |
| commit | 02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch) | |
| tree | 61b9147863cd8be3eff63903dc36cae168254bd5 /src/appl/sample | |
| parent | 162ab371748cba0cc6f172419bd6e71fa04bb878 (diff) | |
| download | krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.xz krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip | |
make mark-cstyle
make reindent
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/sample')
| -rw-r--r-- | src/appl/sample/sample.h | 4 | ||||
| -rw-r--r-- | src/appl/sample/sclient/sclient.c | 14 | ||||
| -rw-r--r-- | src/appl/sample/sserver/sserver.c | 16 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/appl/sample/sample.h b/src/appl/sample/sample.h index 6c81d9351f..e61a2f3e0f 100644 --- a/src/appl/sample/sample.h +++ b/src/appl/sample/sample.h @@ -7,7 +7,7 @@ * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright @@ -21,7 +21,7 @@ * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. - * + * * * Common definitions for the sample client/server. */ diff --git a/src/appl/sample/sclient/sclient.c b/src/appl/sample/sclient/sclient.c index bd9c4e8897..2f9b47933f 100644 --- a/src/appl/sample/sclient/sclient.c +++ b/src/appl/sample/sclient/sclient.c @@ -8,7 +8,7 @@ * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright @@ -22,7 +22,7 @@ * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. - * + * * * Sample Kerberos v5 client. * @@ -70,12 +70,12 @@ net_read(fd, buf, len) if (cc < 0) { if (SOCKET_ERRNO == SOCKET_EINTR) continue; - + /* XXX this interface sucks! */ - errno = SOCKET_ERRNO; - + errno = SOCKET_ERRNO; + return(cc); /* errno is already set */ - } + } else if (cc == 0) { return(len2); } else { @@ -209,7 +209,7 @@ main(int argc, char *argv[]) ccdef, &err_ret, &rep_ret, NULL); krb5_free_principal(context, server); /* finished using it */ - krb5_free_principal(context, client); + krb5_free_principal(context, client); krb5_cc_close(context, ccdef); if (auth_context) krb5_auth_con_free(context, auth_context); diff --git a/src/appl/sample/sserver/sserver.c b/src/appl/sample/sserver/sserver.c index 39710fb2bb..0ad9c07a41 100644 --- a/src/appl/sample/sserver/sserver.c +++ b/src/appl/sample/sserver/sserver.c @@ -8,7 +8,7 @@ * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. - * + * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright @@ -22,7 +22,7 @@ * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. - * + * * * Sample Kerberos v5 server. * @@ -69,7 +69,7 @@ usage(name) { fprintf(stderr, "usage: %s [-p port] [-s service] [-S keytab]\n", name); -} +} int main(argc, argv) @@ -110,7 +110,7 @@ main(argc, argv) /* * Parse command line arguments - * + * */ opterr = 0; while ((ch = getopt(argc, argv, "p:S:s:")) != -1) @@ -144,17 +144,17 @@ main(argc, argv) port = atoi(argv[1]); } - retval = krb5_sname_to_principal(context, NULL, service, + retval = krb5_sname_to_principal(context, NULL, service, KRB5_NT_SRV_HST, &server); if (retval) { syslog(LOG_ERR, "while generating service name (%s): %s", service, error_message(retval)); exit(1); } - + /* * If user specified a port, then listen on that port; otherwise, - * assume we've been started out of inetd. + * assume we've been started out of inetd. */ if (port) { @@ -200,7 +200,7 @@ main(argc, argv) } retval = krb5_recvauth(context, &auth_context, (krb5_pointer)&sock, - SAMPLE_VERSION, server, + SAMPLE_VERSION, server, 0, /* no flags */ keytab, /* default keytab is NULL */ &ticket); |
