Added check of the receiver's address (if present)
authorTheodore Tso <tytso@mit.edu>
Tue, 29 Sep 1992 13:47:04 +0000 (13:47 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 29 Sep 1992 13:47:04 +0000 (13:47 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2417 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/rd_priv.c
src/lib/krb5/krb/rd_safe.c

index 5a3b1b7c9e37e9afe6f7e25b073a6c19af73cf53..00d454703b1107000f620509fc7711db47dd4c46 100644 (file)
@@ -185,6 +185,12 @@ OLDDECLARG(krb5_data *, outbuf)
            cleanup_mesg();
            return KRB5KRB_AP_ERR_BADADDR;
        }
+       if (recv_addr && privmsg_enc_part->r_address &&
+           !krb5_address_compare(recv_addr, privmsg_enc_part->r_address)) {
+           cleanup_data();
+           cleanup_mesg();
+           return KRB5KRB_AP_ERR_BADADDR;
+       }           
        if (retval = krb5_gen_replay_name(sender_addr, "_priv",
                                          &replay.client)) {
            cleanup_data();
index 3155708556f90b6570cba3423a4e5cc570deb63f..c2e29713936358c7522899f36b0493c0c96658f4 100644 (file)
@@ -105,6 +105,11 @@ krb5_data *outbuf;
            cleanup();
            return KRB5KRB_AP_ERR_BADADDR;
        }
+       if (recv_addr && message->r_address &&
+           !krb5_address_compare(recv_addr, message->r_address)) {
+           cleanup();
+           return KRB5KRB_AP_ERR_BADADDR;
+       }           
        if (retval = krb5_gen_replay_name(sender_addr, "_safe",
                                          &replay.client)) {
            cleanup();