char *realm,
int LifeTime,
afs_tk_method method,
- time_t * tok_expiration) {
+ time_t * tok_expiration,
+ char *linkedCell) {
long rc;
CREDENTIALS creds;
return(rc);
}
+ if (linkedCell && ak_cellconfig.linkedCell)
+ StringCbCopyA(linkedCell, MAXCELLCHARS,
+ ak_cellconfig.linkedCell);
+
StringCbCopyA(realm_of_cell, sizeof(realm_of_cell),
afs_realm_of_cell(&ak_cellconfig, FALSE));
char *realm,
int LifeTime,
afs_tk_method method,
- time_t * tok_expiration /* OUT: expiration time of new
- token */
+ time_t * tok_expiration,/* OUT: expiration time of new token */
+ char *linkedCell /* OUT: name of linkedCell (if any) */
);
int
int code;
char cell[MAXCELLCHARS];
char realm[MAXCELLCHARS];
+ char linkedCell[MAXCELLCHARS]="";
khm_handle ctoken;
FILETIME ft_old;
FILETIME ft_new;
khm_size cb;
khm_int32 method = AFS_TOKEN_AUTO;
khm_handle csp_cell = NULL;
+ BOOL bgetLinked = 0;
if (l->rows[i].flags &
(DLGROW_FLAG_DONE | DLGROW_FLAG_DELETED))
method = l->rows[i].method;
}
+ getLinked:
_report_cs3(KHERR_INFO,
L"Getting tokens for cell %1!S! with realm %2!S! using method %3!d!",
- _cstr(cell),
+ _cstr(bgetLinked ? linkedCell: cell),
_cstr(realm),
_int32(method));
_resolve();
/* make the call */
- code = afs_klog(ident, "", cell, realm, 0,
- method, &new_exp);
+ code = afs_klog(ident, "",
+ bgetLinked ? linkedCell : cell,
+ realm, 0,
+ method, &new_exp,
+ bgetLinked ? NULL :linkedCell);
_report_cs1(KHERR_INFO,
L"klog returns code %1!d!",
ident_renew_triggered = TRUE;
}
}
+
+ if ( !bgetLinked && linkedCell[0] ) {
+ bgetLinked = TRUE;
+ goto getLinked;
+ }
}
}