亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? check.c

?? A* sudo sudo/* B* adduser script adduser C* rmuser script rmuser E* tout tout/*
?? C
字號:
/* *  sudo version 1.1 allows users to execute commands as root *  Copyright (C) 1991  The Root Group, Inc. * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 1, or (at your option) *  any later version. * *  This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. * *  If you make modifications to the source, we would be happy to have *  them to include in future releases.  Feel free to send them to: *      Jeff Nieusma                       nieusma@rootgroup.com *      3959 Arbol CT                      (303) 447-8093 *      Boulder, CO 80301-1752              * ******************************************************************* * *  check.c * *  check_user() only returns if the user's timestamp file *  is current or if they enter a correct password. * *  Jeff Nieusma  Thu Mar 21 22:39:07 MST 1991 */#include <stdio.h>#include <string.h>#include <strings.h>#include <fcntl.h>#include <sys/param.h>#include <sys/types.h>#include <sys/stat.h>#include <sys/time.h>#include <sys/file.h>#include <pwd.h>#include "sudo.h"char *getpass();static int  check_timestamp();static void check_passwd();static void update_timestamp();static void reminder();static char *timestampfile_p;static int  timedir_is_good;/******************************************************************** * *  check_user() * *  This function only returns if the user can successfully *  verify who s/he is.   */void check_user(){register int rtn;umask ( 077 );              /* make sure the timestamp files are private */if ( setuid (0) ) {         /* have to be root to see timestamps */    perror("setuid(0)");    exit(1);    }rtn = check_timestamp();    if ( setruid (uid) ) {      /* don't want to be root longer than necessary */    perror("setruid(uid)");    exit(1);    }if ( rtn && uid )           /* if timestamp is not current... */    check_passwd(); if ( setuid (0) ) {         /* have to be root to play with timestamps */    perror("setuid(0)");    exit(1);    }update_timestamp();if ( setruid (uid) ) {      /* don't want to be root longer than necessary */    perror("setruid(uid)");    exit(1);    }umask ( 022 );              /* want a real umask to exec() the command */}/******************************************************************** * *  check_timestamp() * *  this function checks the timestamp file.  If it is within *  TIMEOUT minutes, no password will be required */static int check_timestamp(){static char timestampfile[MAXPATHLEN+1];register char *p;struct stat statbuf;register int timestamp_is_old = -1;time_t now;sprintf ( timestampfile, "%s/%s", TIMEDIR, user );timestampfile_p = timestampfile;timedir_is_good = 1;  /* now there's an assumption for ya... *//* walk through the path one directory at a time */for ( p=timestampfile+1; p=index(p,'/'); *p++='/' ) {    *p='\0';    if ( stat(timestampfile,&statbuf) < 0) {        if ( strcmp ( timestampfile, TIMEDIR ))	    fprintf ( stderr, "Cannot stat() %s\n", timestampfile );	timedir_is_good = 0;        *p='/';	break;	}    }if ( timedir_is_good ) {            /* if all the directories are stat()able */     if ( stat(timestampfile, &statbuf) ) { /* does the file exist?    */        if ( uid ) reminder();             /* if not, do the reminder */	timestamp_is_old=1;                /* and return (1)          */        }    else {                                 /* otherwise, check the time */	now = time ( (time_t *) NULL );	if ( now - statbuf.st_mtime < 60 * TIMEOUT )	    timestamp_is_old = 0;          /* if file is recent, return(0) */	else	    timestamp_is_old = 1;          /* else make 'em enter password */	}    }/* there was a problem stat()ing a directory */else {    timestamp_is_old = 1;                   /* user has to enter password */    if ( mkdir (TIMEDIR, 0700 ) ) {         /* make the TIMEDIR directory */	perror("check_timestamp: mkdir");	timedir_is_good = 0;	}    else {	timedir_is_good = 1;                /* TIMEDIR now exists         */	reminder();	}    }return (timestamp_is_old);}/******************************************************************** * *  update_timestamp() * *  This function changes the timestamp to now */static void update_timestamp(){register int fd;if ( timedir_is_good ) {    unlink ( timestampfile_p );    if (( fd = open (timestampfile_p, O_WRONLY|O_CREAT|O_TRUNC, 0600 )) < 0 )	perror( "update_timestamp: open" );    close (fd);    }}/******************************************************************** * *  check_passwd() * *  This function grabs the user's password and checks with  *  the password in /etc/passwd */static void check_passwd(){char *crypt();struct passwd *pw_ent;char *encrypted;                          /*  this comes from /etc/passwd  */char *pass;                               /*  this is what gets entered    */register int counter=TRIES_FOR_PASSWORD;if ( (pw_ent = getpwuid( uid )) == NULL ) {    sprintf ( user, "%u", uid );    log_error( GLOBAL_NO_PW_ENT );    inform_user ( GLOBAL_NO_PW_ENT );    exit (1);    }encrypted = pw_ent -> pw_passwd;/* you get TRIES_FOR_PASSWORD times to guess your password */while ( counter > 0 ) {    pass = getpass ( "Password:" );    if ( *pass == (char)NULL ) exit(0);    if ( !strcmp(encrypted, crypt(pass,encrypted)))        return;                      /*  if the passwd is correct return() */    -- counter;                                  /*  otherwise, try again  */    fprintf ( stderr, "%s\n", INCORRECT_PASSWORD );    }log_error( PASSWORD_NOT_CORRECT );inform_user ( PASSWORD_NOT_CORRECT );exit (1);}/******************************************************************** * *  reminder() * *  this function just prints the the reminder message */static void reminder(){fprintf(stderr,"\n%s\n%s\n%s\n\n%s\n%s\n\n%s\n%s\n\n", "    sudo version 1.1, Copyright (C) 1991 The Root Group, Inc.","    sudo comes with ABSOLUTELY NO WARRANTY.  This is free software,","    and you are welcome to redistribute it under certain conditions.","We trust you have received the usual lecture from the local Systems","Administrator. It usually boils down to these two things:","        #1) Respect the privacy of others.","        #2) Think before you type.");}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一区二区三区免费乱视频| 欧美日本一区二区三区| 91电影在线观看| 69av一区二区三区| 久久蜜桃香蕉精品一区二区三区| 蜜臀av一区二区在线免费观看 | 91亚洲资源网| 欧美日韩国产综合视频在线观看 | 国产精选一区二区三区| 99re视频这里只有精品| 欧美日韩性生活| 国产视频一区二区在线| 亚洲成人第一页| 成熟亚洲日本毛茸茸凸凹| 欧美伊人久久大香线蕉综合69| 日韩视频在线你懂得| 国产精品国产三级国产aⅴ原创| 日韩av电影天堂| 成人理论电影网| 日韩亚洲欧美在线| 亚洲欧美激情一区二区| 精品亚洲国内自在自线福利| 在线观看91精品国产入口| 精品久久久久久久一区二区蜜臀| 一区二区成人在线观看| 国产精品小仙女| 欧美精选在线播放| 亚洲色图视频网| 国产资源精品在线观看| 欧美三级视频在线播放| 中文字幕av资源一区| 毛片av一区二区三区| 在线免费观看日韩欧美| 国产精品污www在线观看| 蜜臀国产一区二区三区在线播放| 91电影在线观看| 国产精品成人在线观看| 国精产品一区一区三区mba视频 | 视频一区视频二区在线观看| 91蝌蚪porny九色| 久久久久久日产精品| 亚洲国产日韩综合久久精品| 91行情网站电视在线观看高清版| 久久综合久久综合久久综合| 日韩在线卡一卡二| 欧美视频第二页| 亚洲视频一区二区免费在线观看 | 夜夜爽夜夜爽精品视频| 成人99免费视频| 久久亚洲春色中文字幕久久久| 蜜桃av一区二区三区| 国产欧美日韩久久| 丁香婷婷综合五月| 精品少妇一区二区三区在线视频| 亚洲午夜精品在线| 色欧美片视频在线观看在线视频| 中文字幕精品—区二区四季| 国产精品99久| 久久伊人蜜桃av一区二区| 蜜桃传媒麻豆第一区在线观看| 国产精品色婷婷久久58| 久国产精品韩国三级视频| 欧美久久久一区| 午夜精品视频一区| 欧美精品一卡二卡| 爽好多水快深点欧美视频| 欧美日韩卡一卡二| 三级在线观看一区二区| 欧美精品一二三| 丝袜诱惑制服诱惑色一区在线观看 | 成人福利视频在线看| 久久久久88色偷偷免费| 国产suv精品一区二区6| 国产精品久久影院| 成人黄色一级视频| 亚洲人成网站影音先锋播放| 91免费视频网| 夜夜精品浪潮av一区二区三区| 欧美怡红院视频| 日韩电影免费在线看| 欧美大片在线观看| 国产精品123| 成人免费视频在线观看| 在线一区二区三区| 午夜一区二区三区在线观看| 678五月天丁香亚洲综合网| 久久电影网站中文字幕| 久久亚洲综合色一区二区三区| 国产美女在线精品| 国产精品久久午夜| 91免费观看视频在线| 亚洲一区精品在线| 91精品一区二区三区久久久久久 | 精品国产乱码久久久久久久| 狠狠色丁香婷婷综合| 国产精品伦理一区二区| 色婷婷亚洲婷婷| 男男视频亚洲欧美| 久久在线观看免费| www.久久精品| 五月婷婷激情综合网| 欧美tickling网站挠脚心| 国产激情偷乱视频一区二区三区| 国产精品久久777777| 欧美男女性生活在线直播观看| 久久丁香综合五月国产三级网站 | 日本精品一级二级| 视频一区二区中文字幕| 国产欧美日韩激情| 欧美图片一区二区三区| 极品少妇xxxx偷拍精品少妇| 国产精品国产精品国产专区不蜜| 欧美伦理电影网| 成人国产精品视频| 午夜精品久久久久久久99水蜜桃| 精品电影一区二区| 久久精品水蜜桃av综合天堂| 色综合久久久久| 另类小说一区二区三区| 亚洲色图.com| 日韩欧美国产麻豆| 色婷婷亚洲精品| 黄色成人免费在线| 一区二区三区在线视频观看| 欧美va亚洲va在线观看蝴蝶网| 91免费在线播放| 久久99最新地址| 亚洲一区精品在线| 亚洲国产精品黑人久久久| 欧美剧情电影在线观看完整版免费励志电影 | 91免费在线视频观看| 蜜桃视频在线观看一区二区| 亚洲视频中文字幕| 久久久久久久国产精品影院| 欧美日韩一区二区三区免费看| 成人小视频免费在线观看| 日韩精品免费专区| 综合久久综合久久| 久久综合久久综合久久综合| 欧美精品在线一区二区三区| 91麻豆精东视频| 国产高清精品网站| 另类欧美日韩国产在线| 一区二区三区在线免费视频| 国产人久久人人人人爽| 欧美一区二区三区在线电影| 色偷偷久久一区二区三区| 国产成人在线视频免费播放| 日韩电影免费一区| 亚洲自拍偷拍九九九| 国产精品高潮呻吟久久| 久久精品一区蜜桃臀影院| 日韩一区二区三区高清免费看看| 在线欧美小视频| 色综合久久88色综合天天6| 成人毛片视频在线观看| 国产精品99久久不卡二区| 久久aⅴ国产欧美74aaa| 日本成人在线电影网| 亚洲午夜久久久久久久久电影网| 亚洲丝袜制服诱惑| 中文字幕一区二区不卡| 国产女人aaa级久久久级 | 粉嫩嫩av羞羞动漫久久久 | 久久综合久久综合亚洲| 日韩欧美一二区| 91精品国产福利| 欧美高清hd18日本| 欧美色综合久久| 一本色道久久加勒比精品 | 亚洲一区二区三区激情| 最近中文字幕一区二区三区| 国产日韩在线不卡| 国产视频视频一区| 国产欧美一区二区三区网站| 久久人人超碰精品| 精品成人免费观看| 精品免费国产二区三区| 精品国产一区二区国模嫣然| 日韩欧美国产电影| 欧美r级电影在线观看| 日韩免费看网站| 欧美不卡一区二区三区四区| 日韩免费视频一区| 精品国产污网站| 久久久一区二区三区| 久久男人中文字幕资源站| 国产色爱av资源综合区| 日韩一区二区三区在线视频| 不卡视频在线观看| 欧美又粗又大又爽| 欧美日韩中文精品| 555www色欧美视频| 日韩一二三区不卡| 日韩欧美国产三级| 26uuu国产在线精品一区二区| 久久天天做天天爱综合色| 国产日韩欧美a| 亚洲天堂2014| 婷婷久久综合九色国产成人|