+2004-01-30 Jeffrey Altman <jaltman@mit.edu>
+
+ * options.c, cnsres5.rc, cns.h, cns_reg.c cns_reg.h, cns.c:
+ Add checkbox for requesting "no addresses" if it is not
+ specified in the krb5.ini file.
+
2003-02-25 Tom Yu <tlyu@mit.edu>
* kpasswd.c (k5_change_password): Don't pass a NULL pointer to
#ifdef KRB5
char ccname[FILENAME_MAX]; /* ccache file location */
BOOL forwardable; /* TRUE to get forwardable tickets */
+BOOL noaddresses;
krb5_context k5_context;
krb5_ccache k5_ccache;
#endif
krb5_get_init_creds_opt_init(&opts);
krb5_get_init_creds_opt_set_forwardable(&opts, forwardable);
krb5_get_init_creds_opt_set_tkt_life(&opts, lifetime * 60);
-
+ if (noaddresses) {
+ krb5_get_init_creds_opt_set_address_list(&opts, NULL);
+ }
+
/*
* get the initial creds using the password and the options we set above
*/
LRESULT CALLBACK
kwin_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- int n;
#if 0
if (message == wm_kerberos_changed) { /* Message from the ccache */
* ticket options
*/
forwardable = cns_res.forwardable;
+ noaddresses = cns_res.noaddresses;
/*
* Load clock icons
#define IDD_ALERT 312
#define IDD_TKOPT 320
#define IDD_FORWARDABLE 321
+#define IDD_NOADDRESSES 322
/*
* the entire range (400 through 499) is reserved for the blasted variable
extern krb5_ccache k5_ccache;
extern char ccname[FILENAME_MAX];
extern BOOL forwardable;
+extern BOOL noaddresses;
#endif
/*
cns_res.beep = 0;
cns_res.lifetime = DEFAULT_TKT_LIFE * 5;
cns_res.forwardable = 1;
-
+ cns_res.noaddresses = 0;
for (i = 1 ; i < FILE_MENU_MAX_LOGINS ; i++)
cns_res.logins[i][0] = '\0';
if (registry_dword_get(key, "forwardable", &tdw) == 0)
cns_res.forwardable = tdw;
+ if (registry_dword_get(key, "noaddresses", &tdw) == 0)
+ cns_res.noaddresses = tdw;
+
if (registry_dword_get(key, "alert", &tdw) == 0)
cns_res.alert = tdw;
registry_dword_set(key, "beep", cns_res.beep);
registry_dword_set(key, "lifetime", cns_res.lifetime);
registry_dword_set(key, "forwardable", cns_res.forwardable);
+ registry_dword_set(key, "noaddresses", cns_res.noaddresses);
registry_string_set(key, "name", cns_res.name);
registry_string_set(key, "realm", cns_res.realm);
DWORD forwardable; /* get forwardable tickets? */
DWORD conf_override; /* allow changing of confname */
DWORD cc_override; /* allow changing of ccname */
+ DWORD noaddresses; /* Don't require address in tickets */
char name[MAX_K_NAME_SZ]; /* last user used */
char realm[MAX_K_NAME_SZ]; /* last realm used */
char confname[FILENAME_MAX];
95,65,39,12
GROUPBOX "Ticket options",IDD_TKOPT,5,86,158,23,WS_GROUP
CONTROL "&Forwardable",IDD_FORWARDABLE,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,54,95,65,12
+ WS_TABSTOP,25,95,65,12
+ CONTROL "&NoAddresses",IDD_NOADDRESSES,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,90,95,65,12
DEFPUSHBUTTON "OK",IDOK,19,117,52,14
PUSHBUTTON "Cancel",IDCANCEL,95,117,52,14
END
forwardable = cns_res.forwardable;
SendDlgItemMessage(hwnd, IDD_FORWARDABLE, BM_SETCHECK, forwardable, 0);
+ noaddresses = cns_res.noaddresses;
+ SendDlgItemMessage(hwnd, IDD_NOADDRESSES, BM_SETCHECK, noaddresses, 0);
+
return TRUE;
}
forwardable = SendDlgItemMessage(hwnd, IDD_FORWARDABLE, BM_GETCHECK, 0, 0);
cns_res.forwardable = forwardable;
+ noaddresses = SendDlgItemMessage(hwnd, IDD_NOADDRESSES, BM_GETCHECK, 0, 0);
+ cns_res.noaddresses = noaddresses;
+
EndDialog(hwnd, IDOK);
return; /* TRUE */