summaryrefslogtreecommitdiff
path: root/auth-krb5.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-11-21 23:56:47 +1100
committerDamien Miller <djm@mindrot.org>2003-11-21 23:56:47 +1100
commit787b2ec18c013a5076765f93882550918658ea89 (patch)
tree7f33575e4c909759321a234a29d052f842cb589f /auth-krb5.c
parenta8e06cef35c205e1aa562513c6d034a10c8c9a6d (diff)
more whitespace (tabs this time)
Diffstat (limited to 'auth-krb5.c')
-rw-r--r--auth-krb5.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/auth-krb5.c b/auth-krb5.c
index b41c4882b..8377aed10 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -68,7 +68,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
68 krb5_principal server; 68 krb5_principal server;
69 char ccname[40]; 69 char ccname[40];
70 int tmpfd; 70 int tmpfd;
71#endif 71#endif
72 krb5_error_code problem; 72 krb5_error_code problem;
73 krb5_ccache ccache = NULL; 73 krb5_ccache ccache = NULL;
74 74
@@ -97,10 +97,10 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
97 goto out; 97 goto out;
98 98
99 restore_uid(); 99 restore_uid();
100 100
101 problem = krb5_verify_user(authctxt->krb5_ctx, authctxt->krb5_user, 101 problem = krb5_verify_user(authctxt->krb5_ctx, authctxt->krb5_user,
102 ccache, password, 1, NULL); 102 ccache, password, 1, NULL);
103 103
104 temporarily_use_uid(authctxt->pw); 104 temporarily_use_uid(authctxt->pw);
105 105
106 if (problem) 106 if (problem)
@@ -135,7 +135,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
135 temporarily_use_uid(authctxt->pw); 135 temporarily_use_uid(authctxt->pw);
136 if (problem) 136 if (problem)
137 goto out; 137 goto out;
138 138
139 if (!krb5_kuserok(authctxt->krb5_ctx, authctxt->krb5_user, 139 if (!krb5_kuserok(authctxt->krb5_ctx, authctxt->krb5_user,
140 authctxt->pw->pw_name)) { 140 authctxt->pw->pw_name)) {
141 problem = -1; 141 problem = -1;
@@ -143,13 +143,13 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
143 } 143 }
144 144
145 snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid()); 145 snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid());
146 146
147 if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) { 147 if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) {
148 logit("mkstemp(): %.100s", strerror(errno)); 148 logit("mkstemp(): %.100s", strerror(errno));
149 problem = errno; 149 problem = errno;
150 goto out; 150 goto out;
151 } 151 }
152 152
153 if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) { 153 if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) {
154 logit("fchmod(): %.100s", strerror(errno)); 154 logit("fchmod(): %.100s", strerror(errno));
155 close(tmpfd); 155 close(tmpfd);
@@ -166,12 +166,12 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
166 authctxt->krb5_user); 166 authctxt->krb5_user);
167 if (problem) 167 if (problem)
168 goto out; 168 goto out;
169 169
170 problem= krb5_cc_store_cred(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache, 170 problem= krb5_cc_store_cred(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache,
171 &creds); 171 &creds);
172 if (problem) 172 if (problem)
173 goto out; 173 goto out;
174#endif 174#endif
175 175
176 authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache); 176 authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
177 177