Hardware authentication for Linux using ordinary USB Flash Drives.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

51 lines
1.3 KiB

/*
* Copyright (c) 2003-2006 Andrea Luzzardi <scox@sig11.org>
*
* This file is part of the pam_usb project. pam_usb is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
* Public License version 2, as published by the Free Software Foundation.
*
* pam_usb is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdarg.h>
#include "log.h"
void __log_debug(const char *file, int line, const char *fmt, ...)
{
va_list ap;
return ;
fprintf(stderr, "\033[01;34m*\033[00m [%s:%03d] ", file, line);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
}
void log_error(const char *fmt, ...)
{
va_list ap;
fprintf(stderr, "\033[01;31m*\033[00m ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
}
void log_info(const char *fmt, ...)
{
va_list ap;
fprintf(stderr, "\033[01;32m*\033[00m ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
}