Browse Source

Deny SSH authentication

master
Andrea Luzzardi 18 years ago
parent
commit
fd067ce6fb
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      pam_usb/src/local.c

+ 5
- 0
pam_usb/src/local.c View File

@ -42,6 +42,11 @@ int pusb_local_login(t_pusb_options *opts, const char *user,
from += strlen("/dev/"); from += strlen("/dev/");
} }
log_debug("Authentication request from tty %s\n", from); log_debug("Authentication request from tty %s\n", from);
if (!strcmp(from, "ssh"))
{
log_debug("SSH Authentication, aborting.\n");
return (0);
}
strncpy(utsearch.ut_line, from, sizeof(utsearch.ut_line)); strncpy(utsearch.ut_line, from, sizeof(utsearch.ut_line));
setutent(); setutent();
utent = getutline(&utsearch); utent = getutline(&utsearch);


Loading…
Cancel
Save