Complete support for --disable-afs-support
This commit is contained in:
@@ -8,8 +8,11 @@ endif
|
||||
if DCE
|
||||
dir_dce = dceutils
|
||||
endif
|
||||
if !NO_AFS
|
||||
dir_afsutil = afsutil
|
||||
endif
|
||||
SUBDIRS = \
|
||||
afsutil \
|
||||
$(dir_afsutil) \
|
||||
dbutils \
|
||||
ftp \
|
||||
login \
|
||||
|
@@ -536,8 +536,11 @@ cmd
|
||||
#if defined(KRB5)
|
||||
if(guest)
|
||||
reply(500, "Can't be done as guest.");
|
||||
else if($5)
|
||||
else if($5) {
|
||||
#ifndef NO_AFS
|
||||
afslog(NULL, 0);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
reply(500, "Command not implemented.");
|
||||
#endif
|
||||
@@ -547,8 +550,11 @@ cmd
|
||||
#if defined(KRB5)
|
||||
if(guest)
|
||||
reply(500, "Can't be done as guest.");
|
||||
else if($7)
|
||||
else if($7) {
|
||||
#ifndef NO_AFS
|
||||
afslog($5, 0);
|
||||
#endif
|
||||
}
|
||||
if($5)
|
||||
free($5);
|
||||
#else
|
||||
|
@@ -711,7 +711,7 @@ int do_login(int code, char *passwd)
|
||||
return -1;
|
||||
}
|
||||
initgroups(pw->pw_name, pw->pw_gid);
|
||||
#if defined(KRB5)
|
||||
#if defined(KRB5) && !defined(NO_AFS)
|
||||
if(k_hasafs())
|
||||
k_setpag();
|
||||
#endif
|
||||
@@ -864,9 +864,11 @@ krb5_verify(struct passwd *pwd, char *passwd)
|
||||
1,
|
||||
NULL);
|
||||
krb5_free_principal(context, princ);
|
||||
#ifndef NO_AFS
|
||||
if (k_hasafs()) {
|
||||
krb5_afslog_uid_home(context, id,NULL, NULL,pwd->pw_uid, pwd->pw_dir);
|
||||
}
|
||||
#endif
|
||||
krb5_cc_destroy(context, id);
|
||||
krb5_free_context (context);
|
||||
if(ret)
|
||||
|
@@ -145,7 +145,7 @@
|
||||
#include <krb5.h>
|
||||
#endif /* KRB5 */
|
||||
|
||||
#if defined(KRB5)
|
||||
#if defined(KRB5) && !defined(NO_AFS)
|
||||
#include <kafs.h>
|
||||
#endif
|
||||
|
||||
|
@@ -67,7 +67,9 @@ gssapi_session(void *app_data, char *username)
|
||||
1, 1, NULL, NULL);
|
||||
if (GSS_ERROR(major))
|
||||
ret = 1;
|
||||
#ifndef NO_AFS
|
||||
afslog(NULL, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
gss_release_cred(&minor, &data->delegated_cred_handle);
|
||||
|
@@ -82,7 +82,9 @@ cond_kdestroy(void)
|
||||
#endif
|
||||
do_destroy_tickets = 0;
|
||||
}
|
||||
#ifndef NO_AFS
|
||||
afsunlog();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -91,11 +93,13 @@ kdestroy(void)
|
||||
#if KRB5
|
||||
dest_cc();
|
||||
#endif
|
||||
#ifndef NO_AFS
|
||||
afsunlog();
|
||||
#endif
|
||||
reply(200, "Tickets destroyed");
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_AFS
|
||||
void
|
||||
afslog(const char *cell, int quiet)
|
||||
{
|
||||
@@ -134,6 +138,7 @@ afsunlog(void)
|
||||
if(k_hasafs())
|
||||
k_unlog();
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
int ftpd_afslog_placeholder;
|
||||
|
@@ -405,16 +405,11 @@ find_log10(int num)
|
||||
* have to fetch them.
|
||||
*/
|
||||
|
||||
#ifdef KRB5
|
||||
static int do_the_afs_dance = 1;
|
||||
#endif
|
||||
|
||||
static int
|
||||
lstat_file (const char *file, struct stat *sb)
|
||||
{
|
||||
#ifdef KRB5
|
||||
if (do_the_afs_dance &&
|
||||
k_hasafs()
|
||||
#if defined(KRB5) && !defined(NO_AFS)
|
||||
if (k_hasafs()
|
||||
&& strcmp(file, ".")
|
||||
&& strcmp(file, "..")
|
||||
&& strcmp(file, "/"))
|
||||
|
@@ -145,9 +145,6 @@ otp_verify(struct passwd *pwd, const char *password)
|
||||
}
|
||||
#endif /* OTP */
|
||||
|
||||
|
||||
static int pag_set = 0;
|
||||
|
||||
#ifdef KRB5
|
||||
static krb5_context context;
|
||||
static krb5_ccache id, id2;
|
||||
@@ -207,6 +204,8 @@ krb5_finish (void)
|
||||
static void
|
||||
krb5_get_afs_tokens (const struct passwd *pwd)
|
||||
{
|
||||
#ifndef NO_AFS
|
||||
static int pag_set = 0;
|
||||
char cell[64];
|
||||
char *pw_dir;
|
||||
krb5_error_code ret;
|
||||
@@ -231,6 +230,7 @@ krb5_get_afs_tokens (const struct passwd *pwd)
|
||||
pwd->pw_uid, pwd->pw_dir);
|
||||
krb5_cc_close (context, id2);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* KRB5 */
|
||||
|
@@ -87,7 +87,9 @@
|
||||
#ifdef KRB5
|
||||
#include <krb5.h>
|
||||
#endif
|
||||
#ifndef NO_AFS
|
||||
#include <kafs.h>
|
||||
#endif
|
||||
|
||||
#ifdef OTP
|
||||
#include <otp.h>
|
||||
|
@@ -57,7 +57,9 @@ RCSID("$Id$");
|
||||
#ifdef KRB5
|
||||
#include <krb5.h>
|
||||
#endif
|
||||
#ifndef NO_AFS
|
||||
#include <kafs.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
#include <roken.h>
|
||||
#include <getarg.h>
|
||||
@@ -252,11 +254,13 @@ krb5_start_session(void)
|
||||
}
|
||||
esetenv("KRB5CCNAME", cc_name, 1);
|
||||
|
||||
#ifndef NO_AFS
|
||||
/* convert creds? */
|
||||
if(k_hasafs()) {
|
||||
if (k_setpag() == 0)
|
||||
krb5_afslog(context, ccache2, NULL, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
krb5_cc_close(context, ccache2);
|
||||
krb5_cc_destroy(context, ccache);
|
||||
|
@@ -253,7 +253,11 @@ uninstall-hook: uninstall-cat-mans
|
||||
.et.c:
|
||||
$(COMPILE_ET) $<
|
||||
|
||||
if NO_AFS
|
||||
LIB_kafs =
|
||||
else
|
||||
LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
|
||||
endif
|
||||
|
||||
if KRB5
|
||||
LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \
|
||||
|
@@ -99,7 +99,9 @@
|
||||
#include <krb5-v4compat.h>
|
||||
typedef struct credentials CREDENTIALS;
|
||||
#endif /* KRB5 */
|
||||
#ifndef NO_AFS
|
||||
#include <kafs.h>
|
||||
#endif
|
||||
|
||||
#include <resolve.h>
|
||||
|
||||
|
Reference in New Issue
Block a user