]> arthur.barton.de Git - netatalk.git/commitdiff
changed all LOG messages using logtype_default to use logtype_uams
authorsibaz <sibaz>
Sun, 29 Sep 2002 23:30:20 +0000 (23:30 +0000)
committersibaz <sibaz>
Sun, 29 Sep 2002 23:30:20 +0000 (23:30 +0000)
etc/uams/uams_dhx_pam.c
etc/uams/uams_dhx_passwd.c
etc/uams/uams_guest.c
etc/uams/uams_pam.c
etc/uams/uams_passwd.c
etc/uams/uams_pgp.c
etc/uams/uams_randnum.c

index f42704cf200cd49757711ea6f76542a906887077..0c90d51b96078be88ef619a59d328b0f962834b0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_pam.c,v 1.21 2002-02-05 20:42:04 srittau Exp $
+ * $Id: uams_dhx_pam.c,v 1.22 2002-09-29 23:30:20 sibaz Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -83,7 +83,7 @@ static int PAM_conv (int num_msg,
 
   if (num_msg < 1) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM DHX Conversation Err -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM DHX Conversation Err -- %s",
                  strerror(errno));
     /* Log Entry */
     return PAM_CONV_ERR;
@@ -94,7 +94,7 @@ static int PAM_conv (int num_msg,
 
   if (!reply) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM DHX Conversation Err -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM DHX Conversation Err -- %s",
                  strerror(errno));
     /* Log Entry */
     return PAM_CONV_ERR;
@@ -107,7 +107,7 @@ static int PAM_conv (int num_msg,
     case PAM_PROMPT_ECHO_ON:
       if (!(string = COPY_STRING(PAM_username))) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: username failure -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: username failure -- %s",
                  strerror(errno));
     /* Log Entry */
        goto pam_fail_conv;
@@ -116,7 +116,7 @@ static int PAM_conv (int num_msg,
     case PAM_PROMPT_ECHO_OFF:
       if (!(string = COPY_STRING(PAM_password))) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: passwd failure: --: %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: passwd failure: --: %s",
                  strerror(errno));
     /* Log Entry */
        goto pam_fail_conv;
@@ -131,7 +131,7 @@ static int PAM_conv (int num_msg,
     case PAM_ERROR_MSG:
     default:
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Binary_Prompt -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Binary_Prompt -- %s",
                  strerror(errno));
     /* Log Entry */
       goto pam_fail_conv;
@@ -146,7 +146,7 @@ static int PAM_conv (int num_msg,
 
   *resp = reply;
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: PAM Success -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: PAM Success -- %s",
                  strerror(errno));
     /* Log Entry */
   return PAM_SUCCESS;
@@ -164,7 +164,7 @@ pam_fail_conv:
   }
   free(reply);
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM DHX Conversation Err -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM DHX Conversation Err -- %s",
                  strerror(errno));
     /* Log Entry */
     return PAM_CONV_ERR;
@@ -193,7 +193,7 @@ static int dhx_setup(void *obj, char *ibuf, int ibuflen,
     /* get the client's public key */
     if (!(bn = BN_bin2bn(ibuf, KEYSIZE, NULL))) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM No Public Key -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM No Public Key -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -203,7 +203,7 @@ static int dhx_setup(void *obj, char *ibuf, int ibuflen,
     if (!(gbn = BN_bin2bn(&g, sizeof(g), NULL))) {
       BN_clear_free(bn);
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM No Primes: GBN -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM No Primes: GBN -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -213,7 +213,7 @@ static int dhx_setup(void *obj, char *ibuf, int ibuflen,
       BN_free(gbn);
       BN_clear_free(bn);
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM No Primes: PBN -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM No Primes: PBN -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -225,7 +225,7 @@ static int dhx_setup(void *obj, char *ibuf, int ibuflen,
       BN_free(gbn);
       BN_clear_free(bn);
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM DH was equal to DH_New... Go figure... -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM DH was equal to DH_New... Go figure... -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -236,7 +236,7 @@ static int dhx_setup(void *obj, char *ibuf, int ibuflen,
     dh->g = gbn;
     if (!DH_generate_key(dh) || (BN_num_bytes(dh->pub_key) > KEYSIZE)) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Err Generating Key -- Not enough Space? -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Err Generating Key -- Not enough Space? -- %s",
                  strerror(errno));
     /* Log Entry */
     goto pam_fail;
@@ -265,7 +265,7 @@ static int dhx_setup(void *obj, char *ibuf, int ibuflen,
                             &i) < 0) {
       *rbuflen = 0;
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Buffer Encryption Err. -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Buffer Encryption Err. -- %s",
                  strerror(errno));
     /* Log Entry */
       goto pam_fail;
@@ -278,7 +278,7 @@ static int dhx_setup(void *obj, char *ibuf, int ibuflen,
                             (void *) &buf, NULL) < 0) {
       *rbuflen = 0;
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Signature Retieval Failure -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Signature Retieval Failure -- %s",
                  strerror(errno));
     /* Log Entry */
       goto pam_fail;
@@ -300,7 +300,7 @@ pam_fail:
     BN_free(bn);
     DH_free(dh);
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Fail - Cast Encryption -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Fail - Cast Encryption -- %s",
                  strerror(errno));
     /* Log Entry */
     return AFPERR_PARAM;
@@ -322,7 +322,7 @@ static int pam_login(void *obj, struct passwd **uam_pwd,
     if (uam_afpserver_option(obj, UAM_OPTION_USERNAME, (void *) &buf,
                             &i) < 0) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: uam_afpserver_option didn't meet uam_option_username  -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: uam_afpserver_option didn't meet uam_option_username  -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -331,7 +331,7 @@ static int pam_login(void *obj, struct passwd **uam_pwd,
     len = (unsigned char) *ibuf++;
     if ( len > i ) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Signature Retieval Failure -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Signature Retieval Failure -- %s",
                  strerror(errno));
     /* Log Entry */
        return( AFPERR_PARAM );
@@ -345,13 +345,13 @@ static int pam_login(void *obj, struct passwd **uam_pwd,
 
     if (( dhxpwd = uam_getname(buf, i)) == NULL ) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c: unknown username");
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c: unknown username");
     /* Log Entry */
        return AFPERR_PARAM;
     }
 
     PAM_username = buf;
-    LOG(log_info, logtype_default, "dhx login: %s", buf);
+    LOG(log_info, logtype_uams, "dhx login: %s", buf);
     return dhx_setup(obj, ibuf, ibuflen, rbuf, rbuflen);
 }
 
@@ -371,7 +371,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
     memcpy(&sessid, ibuf, sizeof(sessid));
     if (sessid != dhxhash(obj)) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM Session ID - DHXHash Mismatch -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM Session ID - DHXHash Mismatch -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -381,7 +381,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
     if (uam_afpserver_option(obj, UAM_OPTION_CLIENTNAME,
                             (void *) &hostname, NULL) < 0)
        {
-       LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: unable to retrieve client hostname");
+       LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: unable to retrieve client hostname");
        hostname = NULL;
        }
 
@@ -430,7 +430,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
                          &pamh);
     if (PAM_error != PAM_SUCCESS) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: PAM_Error: %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: PAM_Error: %s",
                  pam_strerror(pamh,PAM_error));
     /* Log Entry */
       goto logincont_err;
@@ -444,7 +444,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
       if (PAM_error == PAM_MAXTRIES) 
        err = AFPERR_PWDEXPR;
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: PAM_Error: %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: PAM_Error: %s",
                  pam_strerror(pamh, PAM_error));
     /* Log Entry */
       goto logincont_err;
@@ -459,7 +459,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
        err = AFPERR_PWDCHNG;
 #endif
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: PAM_Error: %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: PAM_Error: %s",
                  pam_strerror(pamh, PAM_error));
     /* Log Entry */
       goto logincont_err;
@@ -471,7 +471,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
     PAM_error = pam_setcred(pamh, PAM_CRED_ESTABLISH);
     if (PAM_error != PAM_SUCCESS) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: PAM_Error: %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: PAM_Error: %s",
                  pam_strerror(pamh, PAM_error));
     /* Log Entry */
       goto logincont_err;
@@ -480,7 +480,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
     PAM_error = pam_open_session(pamh, 0);
     if (PAM_error != PAM_SUCCESS) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: PAM_Error: %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: PAM_Error: %s",
                  pam_strerror(pamh, PAM_error));
     /* Log Entry */
       goto logincont_err;
@@ -489,7 +489,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
     memset(rbuf, 0, PASSWDLEN); /* zero out the password */
     *uam_pwd = dhxpwd;
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: PAM Auth OK!");
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: PAM Auth OK!");
     /* Log Entry */
     return AFP_OK;
 
@@ -538,7 +538,7 @@ static int pam_changepw(void *obj, char *username,
     /* check out the session id */
     if (sessid != dhxhash(obj)) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Session ID not Equal to DHX Hash -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Session ID not Equal to DHX Hash -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -548,7 +548,7 @@ static int pam_changepw(void *obj, char *username,
     if (uam_afpserver_option(obj, UAM_OPTION_HOSTNAME,
                             (void *) &hostname, NULL) < 0) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Hostname Null?? -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Hostname Null?? -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_MISC;
@@ -563,7 +563,7 @@ static int pam_changepw(void *obj, char *username,
      * get sent back an incremented random number. */
     if (!(bn1 = BN_bin2bn(ibuf, KEYSIZE, NULL))) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Random Number Not the same or not incremented-- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Random Number Not the same or not incremented-- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -572,7 +572,7 @@ static int pam_changepw(void *obj, char *username,
     if (!(bn2 = BN_bin2bn(randbuf, sizeof(randbuf), NULL))) {
       BN_free(bn1);
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Random Number Not the same or not incremented -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Random Number Not the same or not incremented -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -586,7 +586,7 @@ static int pam_changepw(void *obj, char *username,
       BN_free(bn2);
       BN_free(bn1);
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Random Number did not Zero -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Random Number did not Zero -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -601,7 +601,7 @@ static int pam_changepw(void *obj, char *username,
     if (!BN_is_one(bn3)) {
       BN_free(bn3);
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: After Random Number not Zero, is it one more? -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: After Random Number not Zero, is it one more? -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
@@ -619,7 +619,7 @@ static int pam_changepw(void *obj, char *username,
                          &lpamh);
     if (PAM_error != PAM_SUCCESS) {
     /* Log Entry */
-           LOG(log_info, logtype_default, "uams_dhx_pam.c :PAM: Needless to say, PAM_error is != to PAM_SUCCESS -- %s",
+           LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Needless to say, PAM_error is != to PAM_SUCCESS -- %s",
                  strerror(errno));
     /* Log Entry */
       return AFPERR_PARAM;
index 2a28f99f9c8b31fa0879a959004684b37a3dbccb..3df63c4b5703406e49c865da6143bf5f3670252e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_passwd.c,v 1.15 2002-02-13 16:44:59 srittau Exp $
+ * $Id: uams_dhx_passwd.c,v 1.16 2002-09-29 23:30:20 sibaz Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -109,13 +109,13 @@ static int passwd_login(void *obj, struct passwd **uam_pwd,
       return AFPERR_PARAM;
     }
 
-    LOG(log_info, logtype_default, "dhx login: %s", name);
+    LOG(log_info, logtype_uams, "dhx login: %s", name);
     if (uam_checkuser(dhxpwd) < 0)
       return AFPERR_NOTAUTH;
 
 #ifdef SHADOWPW
     if (( sp = getspnam( dhxpwd->pw_name )) == NULL ) {
-       LOG(log_info, logtype_default, "no shadow passwd entry for %s", name);
+       LOG(log_info, logtype_uams, "no shadow passwd entry for %s", name);
        return AFPERR_NOTAUTH;
     }
     dhxpwd->pw_passwd = sp->sp_pwdp;
index 9a7fab557331188df51ed6c752e6a71965fd0b59..9521e362c29c18dbbb3714ba1395ea42ee746a71 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_guest.c,v 1.9 2002-01-04 04:45:48 sibaz Exp $
+ * $Id: uams_guest.c,v 1.10 2002-09-29 23:30:20 sibaz Exp $
  *
  * (c) 2001 (see COPYING)
  */
@@ -41,7 +41,7 @@ static int noauth_login(void *obj, struct passwd **uam_pwd,
     char *guest, *username;
 
     *rbuflen = 0;
-    LOG(log_info, logtype_default, "login noauth" );
+    LOG(log_info, logtype_uams, "login noauth" );
 
     if (uam_afpserver_option(obj, UAM_OPTION_GUEST, (void *) &guest,
                             NULL) < 0)
@@ -53,14 +53,14 @@ static int noauth_login(void *obj, struct passwd **uam_pwd,
 
     strcpy(username, guest);
     if ((pwent = getpwnam(guest)) == NULL) {
-       LOG(log_error, logtype_default, "noauth_login: getpwnam( %s ): %s",
+       LOG(log_error, logtype_uams, "noauth_login: getpwnam( %s ): %s",
                guest, strerror(errno) );
        return( AFPERR_BADUAM );
     }
 
 #ifdef AFS
     if ( setpag() < 0 ) {
-       LOG(log_error, logtype_default, "noauth_login: setpag: %s", strerror(errno) );
+       LOG(log_error, logtype_uams, "noauth_login: setpag: %s", strerror(errno) );
        return( AFPERR_BADUAM );
     }
 #endif /* AFS */
@@ -88,13 +88,13 @@ int noauth_printer(start, stop, username, out)
      */
 
     if ((p = strchr(data, '(' )) == NULL) {
-       LOG(log_info, logtype_default,"Bad Login NoAuthUAM: username not found in string");
+       LOG(log_info, logtype_uams,"Bad Login NoAuthUAM: username not found in string");
        free(data);
        return(-1);
     }
     p++;
     if ((q = strchr(data, ')' )) == NULL) {
-       LOG(log_info, logtype_default,"Bad Login NoAuthUAM: username not found in string");
+       LOG(log_info, logtype_uams,"Bad Login NoAuthUAM: username not found in string");
        free(data);
        return(-1);
     }
@@ -104,14 +104,14 @@ int noauth_printer(start, stop, username, out)
     free(data);
 
     if (getpwnam(username) == NULL) {
-       LOG(log_info, logtype_default, "Bad Login NoAuthUAM: %s: %s",
+       LOG(log_info, logtype_uams, "Bad Login NoAuthUAM: %s: %s",
               username, strerror(errno) );
        return(-1);
     }
 
     /* Login successful */
     append(out, loginok, strlen(loginok));
-    LOG(log_info, logtype_default, "Login NoAuthUAM: %s", username);
+    LOG(log_info, logtype_uams, "Login NoAuthUAM: %s", username);
     return(0);
 }
 
index 57d7ee4b7bf981ed1a4a5e7860c5d728c1026d3d..15bc3e449517dde1333658f54fce37e8af9c63cb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pam.c,v 1.11 2002-01-04 04:45:48 sibaz Exp $
+ * $Id: uams_pam.c,v 1.12 2002-09-29 23:30:20 sibaz Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -143,7 +143,7 @@ static int pam_login(void *obj, struct passwd **uam_pwd,
     if (uam_afpserver_option(obj, UAM_OPTION_CLIENTNAME,
                             (void *) &hostname, NULL) < 0)
        {
-       LOG(log_info, logtype_default, "uams_pam.c :PAM: unable to retrieve client hostname");
+       LOG(log_info, logtype_uams, "uams_pam.c :PAM: unable to retrieve client hostname");
        hostname = NULL;
        }
 
@@ -164,7 +164,7 @@ static int pam_login(void *obj, struct passwd **uam_pwd,
        return AFPERR_PARAM;
     }
 
-    LOG(log_info, logtype_default, "cleartext login: %s", username);
+    LOG(log_info, logtype_uams, "cleartext login: %s", username);
     PAM_username = username;
     PAM_password = ibuf; /* Set these things up for the conv function */
 
@@ -303,13 +303,13 @@ int pam_printer(start, stop, username, out)
 
     /* Parse input for username in () */
     if ((p = strchr(data, '(' )) == NULL) {
-       LOG(log_info, logtype_default,"Bad Login ClearTxtUAM: username not found in string");
+       LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: username not found in string");
        free(data);
        return(-1);
     }
     p++;
     if ((q = strstr(data, ") (" )) == NULL) {
-       LOG(log_info, logtype_default,"Bad Login ClearTxtUAM: username not found in string");
+       LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: username not found in string");
        free(data);
        return(-1);
     }
@@ -318,7 +318,7 @@ int pam_printer(start, stop, username, out)
     /* Parse input for password in next () */
     p = q + 3;
     if ((q = strrchr(data, ')' )) == NULL) {
-       LOG(log_info, logtype_default,"Bad Login ClearTxtUAM: password not found in string");
+       LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: password not found in string");
        free(data);
        return(-1);
     }
@@ -333,7 +333,7 @@ int pam_printer(start, stop, username, out)
     PAM_error = pam_start("netatalk", username, &PAM_conversation,
                           &pamh);
     if (PAM_error != PAM_SUCCESS) {
-       LOG(log_info, logtype_default, "Bad Login ClearTxtUAM: %s: %s", 
+       LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: %s: %s", 
                        username, pam_strerror(pamh, PAM_error));
         pam_end(pamh, PAM_error);
         pamh = NULL;
@@ -344,7 +344,7 @@ int pam_printer(start, stop, username, out)
     pam_set_item(pamh, PAM_RHOST, hostname);
     PAM_error = pam_authenticate(pamh,0);
     if (PAM_error != PAM_SUCCESS) {
-       LOG(log_info, logtype_default, "Bad Login ClearTxtUAM: %s: %s", 
+       LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: %s: %s", 
                        username, pam_strerror(pamh, PAM_error));
         pam_end(pamh, PAM_error);
         pamh = NULL;
@@ -353,7 +353,7 @@ int pam_printer(start, stop, username, out)
 
     PAM_error = pam_acct_mgmt(pamh, 0);
     if (PAM_error != PAM_SUCCESS) {
-       LOG(log_info, logtype_default, "Bad Login ClearTxtUAM: %s: %s", 
+       LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: %s: %s", 
                        username, pam_strerror(pamh, PAM_error));
         pam_end(pamh, PAM_error);
         pamh = NULL;
@@ -362,7 +362,7 @@ int pam_printer(start, stop, username, out)
 
     PAM_error = pam_open_session(pamh, 0);
     if (PAM_error != PAM_SUCCESS) {
-       LOG(log_info, logtype_default, "Bad Login ClearTxtUAM: %s: %s", 
+       LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: %s: %s", 
                        username, pam_strerror(pamh, PAM_error));
         pam_end(pamh, PAM_error);
         pamh = NULL;
@@ -372,7 +372,7 @@ int pam_printer(start, stop, username, out)
     /* Login successful, but no need to hang onto it,
        so logout immediately */
     append(out, loginok, strlen(loginok));
-    LOG(log_info, logtype_default, "Login ClearTxtUAM: %s", username);
+    LOG(log_info, logtype_uams, "Login ClearTxtUAM: %s", username);
     pam_close_session(pamh, 0);
     pam_end(pamh, 0);
     pamh = NULL;
index 81d994ed87566948f8fb723256ffc7542a504bd9..5b90d495e1133f5ba55f55a031aaac2f171e9ea6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_passwd.c,v 1.17 2002-02-13 18:26:31 srittau Exp $
+ * $Id: uams_passwd.c,v 1.18 2002-09-29 23:30:20 sibaz Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -109,15 +109,15 @@ static int passwd_login(void *obj, struct passwd **uam_pwd,
         return AFPERR_PARAM;
     }
 
-    LOG(log_info, logtype_default, "cleartext login: %s", username);
+    LOG(log_info, logtype_uams, "cleartext login: %s", username);
     if (uam_checkuser(pwd) < 0) {
-        LOG(log_info, logtype_default, "not a valid user");
+        LOG(log_info, logtype_uams, "not a valid user");
         return AFPERR_NOTAUTH;
     }
 
 #ifdef SHADOWPW
     if (( sp = getspnam( pwd->pw_name )) == NULL ) {
-        LOG(log_info, logtype_default, "no shadow passwd entry for %s", username);
+        LOG(log_info, logtype_uams, "no shadow passwd entry for %s", username);
         return AFPERR_NOTAUTH;
     }
     pwd->pw_passwd = sp->sp_pwdp;
@@ -176,7 +176,7 @@ static int passwd_changepw(void *obj, char *username,
 
 #ifdef SHADOWPW
     if (( sp = getspnam( pwd->pw_name )) == NULL ) {
-        LOG(log_info, logtype_default, "no shadow passwd entry for %s", username);
+        LOG(log_info, logtype_uams, "no shadow passwd entry for %s", username);
         return AFPERR_PARAM;
     }
     pwd->pw_passwd = sp->sp_pwdp;
@@ -225,13 +225,13 @@ struct papfile    *out;
 
     /* Parse input for username in () */
     if ((p = strchr(data, '(' )) == NULL) {
-        LOG(log_info, logtype_default,"Bad Login ClearTxtUAM: username not found in string");
+        LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: username not found in string");
         free(data);
         return(-1);
     }
     p++;
     if ((q = strstr(data, ") (" )) == NULL) {
-        LOG(log_info, logtype_default,"Bad Login ClearTxtUAM: username not found in string");
+        LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: username not found in string");
         free(data);
         return(-1);
     }
@@ -240,7 +240,7 @@ struct papfile      *out;
     /* Parse input for password in next () */
     p = q + 3;
     if ((q = strrchr(data, ')' )) == NULL) {
-        LOG(log_info, logtype_default,"Bad Login ClearTxtUAM: password not found in string");
+        LOG(log_info, logtype_uams,"Bad Login ClearTxtUAM: password not found in string");
         free(data);
         return(-1);
     }
@@ -252,7 +252,7 @@ struct papfile      *out;
     ulen = strlen(username);
 
     if (( pwd = uam_getname(username, ulen)) == NULL ) {
-        LOG(log_info, logtype_default, "Bad Login ClearTxtUAM: ( %s ) not found ",
+        LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: ( %s ) not found ",
             username);
         return(-1);
     }
@@ -264,7 +264,7 @@ struct papfile      *out;
 
 #ifdef SHADOWPW
     if (( sp = getspnam( pwd->pw_name )) == NULL ) {
-        LOG(log_info, logtype_default, "Bad Login ClearTxtUAM: no shadow passwd entry for %s",
+        LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: no shadow passwd entry for %s",
             username);
         return(-1);
     }
@@ -272,7 +272,7 @@ struct papfile      *out;
 #endif /* SHADOWPW */
 
     if (!pwd->pw_passwd) {
-        LOG(log_info, logtype_default, "Bad Login ClearTxtUAM: no password for %s",
+        LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: no password for %s",
             username);
         return(-1);
     }
@@ -284,13 +284,13 @@ struct papfile    *out;
 
     p = crypt(password, pwd->pw_passwd);
     if (strcmp(p, pwd->pw_passwd) != 0) {
-        LOG(log_info, logtype_default, "Bad Login ClearTxtUAM: %s: bad password", username);
+        LOG(log_info, logtype_uams, "Bad Login ClearTxtUAM: %s: bad password", username);
         return(-1);
     }
 
     /* Login successful */
     append(out, loginok, strlen(loginok));
-    LOG(log_info, logtype_default, "Login ClearTxtUAM: %s", username);
+    LOG(log_info, logtype_uams, "Login ClearTxtUAM: %s", username);
     return(0);
 }
 
index 87d2f00bdb3f457eba55079ea8c8dba906d583ea..7cb9cac3ec30a0ebd0209e878c8ca72705817023 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pgp.c,v 1.6 2002-01-04 04:45:48 sibaz Exp $
+ * $Id: uams_pgp.c,v 1.7 2002-09-29 23:30:20 sibaz Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -78,7 +78,7 @@ static int pgp_login(void *obj, struct passwd **uam_pwd,
       return AFPERR_PARAM;
     }
 
-    LOG(log_info, logtype_default, "pgp login: %s", name);
+    LOG(log_info, logtype_uams, "pgp login: %s", name);
     if (uam_checkuser(pgppwd) < 0)
       return AFPERR_NOTAUTH;
 
index 185584873194479d5aa89d63308c0e88fb2c9f4b..863d3403b8dfe1e5e99638f97c5dc5e7229dcf7f 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: uams_randnum.c,v 1.10 2002-01-04 04:45:48 sibaz Exp $
+ * $Id: uams_randnum.c,v 1.11 2002-09-29 23:30:20 sibaz Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -80,7 +80,7 @@ static  __inline__ int home_passwd(const struct passwd *pwd,
   int fd, i;
   
   if ( (fd = open(path, (set) ? O_WRONLY : O_RDONLY)) < 0 ) {
-    LOG(log_error, logtype_default, "Failed to open %s", path);
+    LOG(log_error, logtype_uams, "Failed to open %s", path);
     return AFPERR_ACCESS;
   }
 
@@ -95,19 +95,19 @@ static  __inline__ int home_passwd(const struct passwd *pwd,
   if (!S_ISREG(st.st_mode) || (pwd->pw_uid != st.st_uid) ||
       (pwd->pw_gid != st.st_gid) ||
       (st.st_mode & ( S_IRWXG | S_IRWXO )) ) {
-    LOG(log_info, logtype_default, "Insecure permissions found for %s.", path);
+    LOG(log_info, logtype_uams, "Insecure permissions found for %s.", path);
     goto home_passwd_fail;
   }
 
   /* get the password */
   if (set) {
     if (write(fd, passwd, len) < 0) {
-      LOG(log_error, logtype_default, "Failed to write to %s", path );
+      LOG(log_error, logtype_uams, "Failed to write to %s", path );
       goto home_passwd_fail;
     }
   } else {
     if (read(fd, passwd, len) < 0) {
-      LOG(log_error, logtype_default, "Failed to read from %s", path );
+      LOG(log_error, logtype_uams, "Failed to read from %s", path );
       goto home_passwd_fail;
     }
   
@@ -156,7 +156,7 @@ static int afppasswd(const struct passwd *pwd,
   off_t pos;
   
   if ((fp = fopen(path, (set) ? "r+" : "r")) == NULL) {
-    LOG(log_error, logtype_default, "Failed to open %s", path);
+    LOG(log_error, logtype_uams, "Failed to open %s", path);
     return AFPERR_ACCESS;
   }
   
@@ -174,7 +174,7 @@ static int afppasswd(const struct passwd *pwd,
       if (strncmp(buf, pwd->pw_name, p - buf) == 0) {
        p++;
        if (*p == PASSWD_ILLEGAL) {
-         LOG(log_info, logtype_default, "invalid password entry for %s", pwd->pw_name);
+         LOG(log_info, logtype_uams, "invalid password entry for %s", pwd->pw_name);
          err = AFPERR_ACCESS;
          goto afppasswd_done;
        }
@@ -334,7 +334,7 @@ static int randnum_login(void *obj, struct passwd **uam_pwd,
   if (( randpwd = uam_getname(username, ulen)) == NULL )
     return AFPERR_PARAM; /* unknown user */
   
-  LOG(log_info, logtype_default, "randnum/rand2num login: %s", username);
+  LOG(log_info, logtype_uams, "randnum/rand2num login: %s", username);
   if (uam_checkuser(randpwd) < 0)
     return AFPERR_NOTAUTH;