screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [PATCH 2/4] remove unused file authentication.c


From: Simon Ruderich
Subject: [screen-devel] [PATCH 2/4] remove unused file authentication.c
Date: Sun, 7 Feb 2016 16:34:17 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

---
 src/authentication.c | 61 ----------------------------------------------------
 1 file changed, 61 deletions(-)
 delete mode 100644 src/authentication.c

diff --git a/src/authentication.c b/src/authentication.c
deleted file mode 100644
index 04a30b3..0000000
--- a/src/authentication.c
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <pwd.h>
-#include <stdbool.h>
-#include <stdint.h>
-
-#include "config.h"
-#include "screen.h"
-
-#include "attacher.h"
-
-#if USE_PAM
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
-#endif
-
-bool CheckPassword() {
-#if USE_PAM
-       pam_handle_t *pamh = 0;
-       struct pam_conv pamc;
-       int pam_error;
-       char *tty_name;
-
-       pamc.conv = &misc_conv; 
-       pamc.appdata_ptr = NULL;
-       pam_error = pam_start("screen", ppp->pw_name, &pamc, &pamh);
-       if (pam_error != PAM_SUCCESS) {
-               AttacherFinit(0);  /* goodbye */
-       }
-
-       if (strncmp(attach_tty, "/dev/", 5) == 0) {
-               tty_name = attach_tty + 5;
-       } else {
-               tty_name = attach_tty;
-       }
-       pam_error = pam_set_item(pamh, PAM_TTY, tty_name);
-       if (pam_error != PAM_SUCCESS) {
-               AttacherFinit(0);  /* goodbye */
-       }
-
-       printf("\aScreen used by %s%s<%s> on %s.\n",
-               ppp->pw_gecos, ppp->pw_gecos[0] ? " " : "", ppp->pw_name, 
HostName);
-       pam_error = pam_authenticate(pamh, 0);
-       pam_end(pamh, pam_error);
-       if (pam_error == PAM_SUCCESS) {
-               return true;
-       }
-       return false;
-#else
-       return true;
-#endif
-}
-
-void Authenticate() {
-       while (1) {
-               errno = 0;
-
-               if(CheckPassword()) {
-                       break;
-               }
-
-       }
-}
-- 
2.7.0

-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]