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

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
  1. /*
  2. * Copyright (c) 2003-2006 Andrea Luzzardi <scox@sig11.org>
  3. *
  4. * This file is part of the pam_usb project. pam_usb is free software;
  5. * you can redistribute it and/or modify it under the terms of the GNU General
  6. * Public License version 2, as published by the Free Software Foundation.
  7. *
  8. * pam_usb is distributed in the hope that it will be useful, but WITHOUT ANY
  9. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  10. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  11. * details.
  12. *
  13. * You should have received a copy of the GNU General Public License along with
  14. * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  15. * Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. #include <stdio.h>
  18. #include <stdarg.h>
  19. #include "log.h"
  20. void __log_debug(const char *file, int line, const char *fmt, ...)
  21. {
  22. va_list ap;
  23. return ;
  24. fprintf(stderr, "\033[01;34m*\033[00m [%s:%03d] ", file, line);
  25. va_start(ap, fmt);
  26. vfprintf(stderr, fmt, ap);
  27. va_end(ap);
  28. }
  29. void log_error(const char *fmt, ...)
  30. {
  31. va_list ap;
  32. fprintf(stderr, "\033[01;31m*\033[00m ");
  33. va_start(ap, fmt);
  34. vfprintf(stderr, fmt, ap);
  35. va_end(ap);
  36. }
  37. void log_info(const char *fmt, ...)
  38. {
  39. va_list ap;
  40. fprintf(stderr, "\033[01;32m*\033[00m ");
  41. va_start(ap, fmt);
  42. vfprintf(stderr, fmt, ap);
  43. va_end(ap);
  44. }