diff options
author | Tom Yu <tlyu@mit.edu> | 2002-08-14 03:09:53 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2002-08-14 03:09:53 +0000 |
commit | 2d3e7e2ff06879a37f188b6543f7f00561caa777 (patch) | |
tree | a9b343a33ea0bfca8191f5b552505e4f5901a816 /src | |
parent | 195a4ee5ec6d110f1660bf2471061b4b53445246 (diff) | |
download | krb5-2d3e7e2ff06879a37f188b6543f7f00561caa777.zip krb5-2d3e7e2ff06879a37f188b6543f7f00561caa777.tar.gz krb5-2d3e7e2ff06879a37f188b6543f7f00561caa777.tar.bz2 |
* acl_files.c (canon;): Properly handle appending of the local
realm, which was botched due to a buffer-overflow patch.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14708 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/kadmin/v4server/ChangeLog | 5 | ||||
-rw-r--r-- | src/kadmin/v4server/acl_files.c | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/kadmin/v4server/ChangeLog b/src/kadmin/v4server/ChangeLog index a211706..8865dde 100644 --- a/src/kadmin/v4server/ChangeLog +++ b/src/kadmin/v4server/ChangeLog @@ -1,3 +1,8 @@ +2002-08-13 Tom Yu <tlyu@mit.edu> + + * acl_files.c (canon;): Properly handle appending of the local + realm, which was botched due to a buffer-overflow patch. + 2001-11-19 Ezra Peisach <epeisach@mit.edu> * kadm_server.h: Update prototype for convert_kadm5_to_kadm. diff --git a/src/kadmin/v4server/acl_files.c b/src/kadmin/v4server/acl_files.c index 8a6118c..bbc9bb7 100644 --- a/src/kadmin/v4server/acl_files.c +++ b/src/kadmin/v4server/acl_files.c @@ -142,12 +142,19 @@ char *canon; return; } } else if(krb_get_lrealm(realm, 1) != KSUCCESS) { - if(canon + strlen(realm) < canon_save + MAX_PRINCIPAL_SIZE) { + if(canon + strlen(KRB_REALM) < canon_save + MAX_PRINCIPAL_SIZE) { strcpy(canon, KRB_REALM); } else { strcpy(canon, ""); return; } + } else { + if (canon + strlen(realm) < canon_save + MAX_PRINCIPAL_SIZE) { + strcpy(canon, realm); + } else { + strcpy(canon, ""); + return; + } } } |