get_pauth.c

来自「socket5 代理服务代码 socket5 代理服务代码」· C语言 代码 · 共 31 行

C
31
字号
/*                                                                           *//*  * Copyright (c) 1989, 1990 by the University of Washington               *//*  *                                                                        *//*  * For copying and distribution information, please see the file          *//*  * <copyright.h>.                                                         */#include "pmachine.h"#include "pwd.h"#include "pcompat.h"#include "pauthent.h"PAUTHget_pauth(type)    int		type;    {	static PAUTH_ST   no_auth_st;	static PAUTH		  no_auth = NULL;	struct passwd *whoiampw;	if(no_auth == NULL) {	    no_auth = &no_auth_st;	    strcpy(no_auth->auth_type,"UNAUTHENTICATED");	    /* find out who we are */	    DISABLE_PFS(whoiampw = getpwuid(getuid()));	    if (whoiampw == 0) strcpy(no_auth->authenticator,"nobody");	    else strcpy(no_auth->authenticator, whoiampw->pw_name);	}	return(no_auth);    }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?