+2002-12-13 Tom Yu <tlyu@mit.edu>
+
+ * ad_print.c, g_in_tkt.c, g_pw_in_tkt.c, kadm_net.c, klog.c:
+ * kuserok.c, log.c, memcache.c, netread.c, netwrite.c:
+ * password_to_key.c, recvauth.c, stime.c, tkt_string.c:
+ Change _WINDOWS to _WIN32 in many places. Update copyright
+ notices. Remove _WINDOWS handling completely in a few places
+ where it's not needed.
+
2002-12-12 Tom Yu <tlyu@mit.edu>
* FSp-glue.c: Extracted and ported from various files from KfM.
/*
- * ad_print.c
+ * lib/krb4/ad_print.c
*
- * Copyright 1988 by the Massachusetts Institute of Technology.
+ * Copyright 1988 by the Massachusetts Institute of Technology. All
+ * Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
- *
- * Miscellaneous debug printing utilities
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*/
-#include "mit-copyright.h"
#include "krb.h"
#include "des.h"
#include "krb4int.h"
#include <stdio.h>
#include "port-sockets.h"
-#ifndef _WINDOWS
+#ifndef _WIN32
/*
* Print some of the contents of the given authenticator structure
#include "krb.h"
#include "des.h"
+#include "krb4int.h"
#include "prot.h"
#include <string.h>
/*
- * g_pw_in_tkt.c
+ * lib/krb4/g_pw_in_tkt.c
*
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*/
-#include "mit-copyright.h"
#include <krb5.h>
#include "krb.h"
#include "krb_err.h"
char *user, *instance, *realm, *passwd;
C_Block key;
{
-#if defined(_WINDOWS) || defined(macintosh)
+#if defined(_WIN32) || defined(macintosh)
string_to_key(passwd, key);
#else /* unix */
#ifdef NOENCRYPTION
int life;
char *password;
{
-#if defined(_WINDOWS) || defined(macintosh)
+#if defined(_WIN32) || defined(macintosh)
/* In spite of the comments above, we don't allow that path here,
to simplify coding the non-UNIX clients. The only code that now
depends on this behavior is the preauth support, which has a
int preauth_len;
int ret_st;
-#if defined(_WINDOWS) || defined(macintosh)
+#if defined(_WIN32) || defined(macintosh)
/* On non-Unix systems, we can't handle a null password, because
passwd_to_key can't handle prompting for the password. */
if (password == 0)
/*
- * kadm_net.c
+ * lib/krb4/kadm_net.c
*
* Copyright 1988, 2002 by the Massachusetts Institute of Technology.
* All Rights Reserved.
#include "prot.h"
/* XXX FIXME! */
-#if defined(_WINDOWS) || defined(macintosh)
+#if defined(_WIN32) || defined(macintosh)
#define SIGNAL(s, f) 0
#else
#define SIGNAL(s, f) signal(s, f)
- extern int errno;
#endif
static void clear_secrets(des_cblock sess_key, Key_schedule sess_sched);
/* XXX FIXME! */
+#ifdef SIGPIPE
static sigtype (*opipe)();
-
+#endif
/*
* kadm_init_link
return KADM_NO_CONN; /* couldnt get the connect */
}
+#ifdef SIGPIPE
opipe = SIGNAL(SIGPIPE, SIG_IGN);
+#endif
client_parm->my_addr_len = sizeof(client_parm->my_addr);
if (SOCKET_GETSOCKNAME(client_parm->admin_fd,
(struct sockaddr *) & client_parm->my_addr,
&client_parm->my_addr_len) < 0) {
(void) SOCKET_CLOSE(client_parm->admin_fd);
client_parm->admin_fd = -1;
+#ifdef SIGPIPE
(void) SIGNAL(SIGPIPE, opipe);
+#endif
return KADM_NO_HERE; /* couldnt find out who we are */
}
#if 0
sizeof(on)) < 0) {
(void) closesocket(client_parm.admin_fd);
client_parm.admin_fd = -1;
+#ifdef SIGPIPE
(void) SIGNAL(SIGPIPE, opipe);
+#endif
return KADM_NO_CONN; /* XXX */
}
#endif
void kadm_cli_disconn(Kadm_Client *client_parm)
{
(void) SOCKET_CLOSE(client_parm->admin_fd);
+#ifdef SIGPIPE
(void) SIGNAL(SIGPIPE, opipe);
+#endif
return;
}
/*
- * klog.c
+ * lib/krb4/klog.c
*
- * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
- * of Technology.
+ * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute of
+ * Technology. All Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*/
-#include "mit-copyright.h"
#include "krb.h"
#ifdef HAVE_TIME_H
#include <time.h>
#endif
-#if !defined(VMS) && !defined(_WINDOWS)
+#if !defined(VMS) && !defined(_WIN32)
#include <sys/time.h>
#endif
#include <stdio.h>
/*
- * kuserok.c
+ * lib/krb4/kuserok.c
*
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*
* kuserok: check if a kerberos principal has
* access to a local account
*/
-#include "mit-copyright.h"
#include "krb.h"
-#if !defined(_WINDOWS)
+#if !defined(_WIN32)
#include <stdio.h>
#include <pwd.h>
/*
- * log.c
+ * lib/krb4/log.c
*
- * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
- * of Technology.
+ * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute of
+ * Technology. All Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*/
#ifdef KRB_CRYPT_DEBUG
krb_set_logfile, or change all the invokers. */
#endif
-#include "mit-copyright.h"
#include "krb.h"
#ifdef HAVE_TIME_H
#include <time.h>
#endif
-#if !defined(VMS) && !defined(_WINDOWS)
+#if !defined(VMS) && !defined(_WIN32)
#include <sys/time.h>
#endif
#include <stdio.h>
#include "krb.h"
-#ifdef _WINDOWS
+#ifdef _WIN32
#include <errno.h>
typedef DWORD OSErr;
static int fNumSessions = 0;
static Session **fSessions = 0;
-#ifndef _WINDOWS
+#ifndef _WIN32
#define change_cache()
#endif
-#if defined (_WINDOWS) || defined (unix)
+#if defined (_WIN32) || defined (unix)
/* Fake Mac handles up for general use. */
#define Handle char **
#define Size int
#endif /* Windows || unix */
-#ifdef _WINDOWS
+#ifdef _WIN32
/*
* change_cache should be called after the cache changes.
/*
- * netread.c
+ * lib/krb4/netwrite.c
*
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*/
-#include "mit-copyright.h"
#include <errno.h>
#include "krb.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifndef _WINDOWS
-extern int errno;
-#endif
#include "port-sockets.h"
/*
/*
- * netwrite.c
+ * lib/krb4/netwrite.c
*
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*/
-#include "mit-copyright.h"
#include <errno.h>
#include "krb.h"
#ifdef HAVE_UNISTD_H
#endif
#include "port-sockets.h"
-#ifndef _WINDOWS
-extern int errno;
-#endif
-
/*
* krb_net_write() writes "len" bytes from "buf" to the file
* descriptor "fd". It returns the number of bytes written or
/*
- * password_to_key.c -- password_to_key functions merged from KfM
+ * lib/krb4/password_to_key.c
*
* Copyright 1999, 2002 by the Massachusetts Institute of Technology.
* All Rights Reserved.
* 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.
+ *
+ * password_to_key functions merged from KfM
*/
#include <string.h>
if (passwd)
mit_string_to_key(passwd, key);
-#if !(defined(_WINDOWS) || defined(macintosh))
+#if !(defined(_WIN32) || defined(macintosh))
else {
des_read_password((C_Block *)key, "Password: ", 0);
}
if (passwd)
afs_string_to_key(passwd, realm, key);
-#if !(defined(_WINDOWS) || defined(macintosh))
+#if !(defined(_WIN32) || defined(macintosh))
else {
des_read_password((C_Block *)key, "Password: ", 0);
}
/*
- * recvauth.c
+ * lib/krb4/recvauth.c
*
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*/
-#include "mit-copyright.h"
-
#include "krb.h"
#include <errno.h>
#include <stdio.h>
* be sure to support old versions of krb_sendauth!
*/
-#ifndef _WINDOWS
-extern int errno;
-#endif
-
/*
* krb_recvauth() reads (and optionally responds to) a message sent
* using krb_sendauth(). The "options" argument is a bit-field of
/*
- * stime.c
+ * lib/krb4/stime.c
*
- * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
- * of Technology.
+ * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute of
+ * Technology. All Rights Reserved.
*
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Export of this software from the United States of America may
+ * 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
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * 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.
*/
-#include "mit-copyright.h"
#include "krb.h"
#include "krb4int.h"
#include <stdio.h> /* for sprintf() */
-#ifndef _WINDOWS
+#ifndef _WIN32
#include <time.h>
#include <sys/time.h>
#endif
#endif
-#ifdef _WINDOWS
+#ifdef _WIN32
typedef unsigned long uid_t;
uid_t getuid(void) { return 0; }
-#endif /* _WINDOWS */
+#endif /* _WIN32 */
/*
* This routine is used to generate the name of the file that holds