anchor.diff:  
   
   (in-package #:cerberus)
  +
  +(defun generate-error (error-code realm &key ctime cusec cname etext edata)
  +  (make-krb-error :pvno 5
  +		  :type 30
  +		  :ctime ctime
  +		  :cusec cusec
  +		  :stime (get-universal-time)
  +		  :susec 0
  +		  :error-code error-code
  +		  :cname cname
  +		  :crealm realm
  +		  :realm realm
  +		  :sname (krbtgt-principal realm)
  +		  :etext etext
  +		  :edata edata))
   
   ;; this is to request a ticket for the TGS, i.e. krbtgt principal
   (defun generate-as-rep (req)
  
positive.code: 	(make-kdc-rep :type :as 
  		      :crealm (kdc-req-body-realm body)
  		      :cname (kdc-req-body-cname body)
  		      :ticket (make-ticket :enc-part (encrypt-data (make-enc-ticket-part)))
  		      :enc-part (encrypt-data (make-enc-kdc-rep-part)))))))
  
  ;; this is to request a ticket for any principal
  
negative.code: 		 (krb-error-err e))
  	       (error (e) 
  		 (kdc-log :error "Failed to process: ~A" e)
  		 (generate-error :generic *default-realm*)))))
  	(etypecase res
  	  (kdc-rep (encode-kdc-rep out res))
  	  (krb-error (encode-krb-error out res)))))))
  