#include <mit-copyright.h>
#include "sms_private.h"
#include <krb.h>
-#include "krb_et.h"
-
+#include <krb_et.h>
/* Authenticate this client with the SMS server. prog is the name of the
* client program, and will be recorded in the database.
char *args[2];
int argl[2];
char realm[REALM_SZ];
+ char host[BUFSIZ];
register sms_params *params = ¶ms_st;
sms_params *reply = NULL;
* The "service" and "instance" should not be hardcoded here.
*/
- if ((status = get_krbrlm(realm, 1)) != KSUCCESS) {
+ bzero(host, sizeof(host));
+ if (status = sms_host(host, sizeof(host) - 1))
return status;
- }
+
+ strcpy(realm, krb_realmofhost(host));
+
status = krb_mk_req(&auth, "sms", "sms", realm, 0);
if (status != KSUCCESS) {
status += ERROR_TABLE_BASE_krb;