Don't use vsyslog; use syslog instead. Fixed lint flames
authorTheodore Tso <tytso@mit.edu>
Tue, 19 Dec 1995 22:30:07 +0000 (22:30 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 19 Dec 1995 22:30:07 +0000 (22:30 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7237 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin.old/server/ChangeLog
src/kadmin.old/server/adm_server.c

index 0e0db1cfdf09a5791923470e2e66e438a1e1f821..988b232196a5f8b2010e3e3757215fe2eccc6e86 100644 (file)
@@ -1,3 +1,8 @@
+Tue Dec 19 17:24:13 1995  Theodore Y. Ts'o  <tytso@dcl>
+
+       * adm_server.c (kdc_com_err_proc): Don't use vsyslog; use syslog
+               instead.   Fixed lint flames.
+
 Wed Dec 13 03:51:53 1995  Chris Provenzano (proven@mit.edu)
 
         * adm_funcs.c : Remove mkvno for krb5_db_entry
index c704c39b58488ede9566fb305582af29041fb123..938bd843fa2d6ca48fa4124b470b1a4c93bba853 100644 (file)
@@ -244,9 +244,9 @@ process_args(context, argc, argv)
     /* initialize random key generators */
     for (ktype = 0; ktype <= krb5_max_enctype; ktype++) {
        if (krb5_enctype_array[ktype]) {
-               if (retval = (*krb5_enctype_array[ktype]->system->
-                               init_random_key)(&master_keyblock,
-                               &krb5_enctype_array[ktype]->random_sequence)) {
+               if ((retval = (*krb5_enctype_array[ktype]->system->
+                              init_random_key)(&master_keyblock,
+                                               &krb5_enctype_array[ktype]->random_sequence))) {
                        com_err(argv[0], retval, 
        "while setting up random key generator for ktype %d--ktype disabled", 
                                ktype);
@@ -354,12 +354,12 @@ init_db(context, dbname, masterkeyname, masterkeyblock)
        convert server.key into a real key 
        (it may be encrypted in the database) 
  */
-    if (retval = krb5_dbe_find_enctype(context,
-                                      &server_entry,
-                                      ENCTYPE_DES_CBC_MD5,
-                                      -1,
-                                      -1,
-                                      &kdatap)) {
+    if ((retval = krb5_dbe_find_enctype(context,
+                                       &server_entry,
+                                       ENCTYPE_DES_CBC_MD5,
+                                       -1,
+                                       -1,
+                                       &kdatap))) {
        krb5_db_free_principal(context, &server_entry, number_of_entries);
        (void) krb5_finish_key(context, &master_encblock);
        memset((char *)&master_encblock, 0, sizeof(master_encblock));
@@ -409,6 +409,7 @@ kdc_com_err_proc(whoami, code, format, pvar)
 #ifndef __STDC__
     extern int vfprintf();
 #endif
+    char tbuf[1024];
 
     if (whoami) {
        fputs(whoami, stderr);
@@ -438,10 +439,12 @@ kdc_com_err_proc(whoami, code, format, pvar)
                strcpy(nfmt, error_message(code));
                strcat(nfmt, " ");
                strcat(nfmt, format);
-               vsyslog(LOG_ERR, nfmt, pvar);
+               vsprintf(tbuf, nfmt, pvar);
+               syslog(LOG_ERR, tbuf);
                free(nfmt);
        } else {
-               vsyslog(LOG_ERR, format, pvar);
+               vsprintf(tbuf, format, pvar);
+               syslog(LOG_ERR, tbuf);
        }
     } else {
        if (code) {