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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? nt.c

?? zip壓縮
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*  Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.  See the accompanying file LICENSE, version 2000-Apr-09 or later  (the contents of which are also included in unzip.h) for terms of use.  If, for some reason, all these files are missing, the Info-ZIP license  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html*//*  Copyright (c) 1996  Scott Field (dedicated to Info-Zip group)  Module Name:    nt.c  Abstract:    This module implements WinNT security descriptor operations for the    Win32 Info-ZIP project.  Operation such as setting file security,    using/querying local and remote privileges, and queuing of operations    is performed here.  The contents of this module are only relevant    when the code is running on Windows NT, and the target volume supports    persistent Acl storage.    User privileges that allow accessing certain privileged aspects of the    security descriptor (such as the Sacl) are only used if the user specified    to do so.  Author:    Scott Field (sfield@microsoft.com)  Last revised:  18 Jan 97 */#define WIN32_LEAN_AND_MEAN#define UNZIP_INTERNAL#include "../unzip.h"#include <windows.h>#ifdef __RSXNT__#  include "../win32/rsxntwin.h"#endif#include "../win32/nt.h"#ifdef NTSD_EAS         /* This file is only needed for NTSD handling *//* Borland C++ does not define FILE_SHARE_DELETE. Others also? */#ifndef FILE_SHARE_DELETE#  define FILE_SHARE_DELETE 0x00000004#endif/* private prototypes */static BOOL Initialize(VOID);#if 0   /* currently unused */static BOOL Shutdown(VOID);#endifstatic BOOL DeferSet(char *resource, PVOLUMECAPS VolumeCaps, uch *buffer);static VOID GetRemotePrivilegesSet(CHAR *FileName, PDWORD dwRemotePrivileges);static VOID InitLocalPrivileges(VOID);BOOL bInitialized = FALSE;  /* module level stuff initialized? */HANDLE hInitMutex = NULL;   /* prevent multiple initialization */BOOL g_bRestorePrivilege = FALSE;   /* for local set file security override */BOOL g_bSaclPrivilege = FALSE;      /* for local set sacl operations, only when                                       restore privilege not present *//* our single cached volume capabilities structure that describes the last   volume root we encountered.  A single entry like this works well in the   zip/unzip scenario for a number of reasons:   1. typically one extraction path during unzip.   2. typically process one volume at a time during zip, and then move      on to the next.   3. no cleanup code required and no memory leaks.   4. simple code.   This approach should be reworked to a linked list approach if we expect to   be called by many threads which are processing a variety of input/output   volumes, since lock contention and stale data may become a bottleneck. */VOLUMECAPS g_VolumeCaps;CRITICAL_SECTION VolumeCapsLock;/* our deferred set structure linked list element, used for making a copy   of input data which is used at a later time to process the original input   at a time when it makes more sense. eg, applying security to newly created   directories, after all files have been placed in such directories. */CRITICAL_SECTION SetDeferLock;typedef struct _DEFERRED_SET {    struct _DEFERRED_SET *Next;    uch *buffer;                /* must point to DWORD aligned block */    PVOLUMECAPS VolumeCaps;    char *resource;} DEFERRED_SET, *PDEFERRED_SET, *LPDEFERRED_SET;PDEFERRED_SET pSetHead = NULL;PDEFERRED_SET pSetTail;static BOOL Initialize(VOID){    HANDLE hMutex;    HANDLE hOldMutex;    if(bInitialized) return TRUE;    hMutex = CreateMutex(NULL, TRUE, NULL);    if(hMutex == NULL) return FALSE;    hOldMutex = (HANDLE)InterlockedExchange((LPLONG)&hInitMutex, (LONG)hMutex);    if(hOldMutex != NULL) {        /* somebody setup the mutex already */        InterlockedExchange((LPLONG)&hInitMutex, (LONG)hOldMutex);        CloseHandle(hMutex); /* close new, un-needed mutex */        /* wait for initialization to complete and return status */        WaitForSingleObject(hOldMutex, INFINITE);        ReleaseMutex(hOldMutex);        return bInitialized;    }    /* initialize module level resources */    InitializeCriticalSection( &SetDeferLock );    InitializeCriticalSection( &VolumeCapsLock );    memset(&g_VolumeCaps, 0, sizeof(VOLUMECAPS));    InitLocalPrivileges();    bInitialized = TRUE;    ReleaseMutex(hMutex); /* release correct mutex */    return TRUE;}#if 0   /* currently not used ! */static BOOL Shutdown(VOID){    /* really need to free critical sections, disable enabled privilges, etc,       but doing so brings up possibility of race conditions if those resources       are about to be used.  The easiest way to handle this is let these       resources be freed when the process terminates... */    return TRUE;}#endif /* never */static BOOL DeferSet(char *resource, PVOLUMECAPS VolumeCaps, uch *buffer){    PDEFERRED_SET psd;    DWORD cbDeferSet;    DWORD cbResource;    DWORD cbBuffer;    if(!bInitialized) if(!Initialize()) return FALSE;    cbResource = lstrlenA(resource) + 1;    cbBuffer = GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)buffer);    cbDeferSet = sizeof(DEFERRED_SET) + cbBuffer + sizeof(VOLUMECAPS) +      cbResource;    psd = (PDEFERRED_SET)HeapAlloc(GetProcessHeap(), 0, cbDeferSet);    if(psd == NULL) return FALSE;    psd->Next = NULL;    psd->buffer = (uch *)(psd+1);    psd->VolumeCaps = (PVOLUMECAPS)((char *)psd->buffer + cbBuffer);    psd->resource = (char *)((char *)psd->VolumeCaps + sizeof(VOLUMECAPS));    memcpy(psd->buffer, buffer, cbBuffer);    memcpy(psd->VolumeCaps, VolumeCaps, sizeof(VOLUMECAPS));    psd->VolumeCaps->bProcessDefer = TRUE;    memcpy(psd->resource, resource, cbResource);    /* take defer lock */    EnterCriticalSection( &SetDeferLock );    /* add element at tail of list */    if(pSetHead == NULL) {        pSetHead = psd;    } else {        pSetTail->Next = psd;    }    pSetTail = psd;    /* release defer lock */    LeaveCriticalSection( &SetDeferLock );    return TRUE;}BOOL ProcessDefer(PDWORD dwDirectoryCount, PDWORD dwBytesProcessed,                  PDWORD dwDirectoryFail, PDWORD dwBytesFail){    PDEFERRED_SET This;    PDEFERRED_SET Next;    *dwDirectoryCount = 0;    *dwBytesProcessed = 0;    *dwDirectoryFail = 0;    *dwBytesFail = 0;    if(!bInitialized) return TRUE; /* nothing to do */    EnterCriticalSection( &SetDeferLock );    This = pSetHead;    while(This) {        if(SecuritySet(This->resource, This->VolumeCaps, This->buffer)) {            (*dwDirectoryCount)++;            *dwBytesProcessed +=              GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)This->buffer);        } else {            (*dwDirectoryFail)++;            *dwBytesFail +=              GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)This->buffer);        }        Next = This->Next;        HeapFree(GetProcessHeap(), 0, This);        This = Next;    }    pSetHead = NULL;    LeaveCriticalSection( &SetDeferLock );    return TRUE;}BOOL ValidateSecurity(uch *securitydata){    PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)securitydata;    PACL pAcl;    PSID pSid;    BOOL bAclPresent;    BOOL bDefaulted;    if(!IsWinNT()) return TRUE; /* don't do anything if not on WinNT */    if(!IsValidSecurityDescriptor(sd)) return FALSE;    /* verify Dacl integrity */    if(!GetSecurityDescriptorDacl(sd, &bAclPresent, &pAcl, &bDefaulted))        return FALSE;    if(bAclPresent) {        if(!IsValidAcl(pAcl)) return FALSE;    }    /* verify Sacl integrity */    if(!GetSecurityDescriptorSacl(sd, &bAclPresent, &pAcl, &bDefaulted))        return FALSE;    if(bAclPresent) {        if(!IsValidAcl(pAcl)) return FALSE;    }    /* verify owner integrity */    if(!GetSecurityDescriptorOwner(sd, &pSid, &bDefaulted))        return FALSE;    if(pSid != NULL) {        if(!IsValidSid(pSid)) return FALSE;    }    /* verify group integrity */    if(!GetSecurityDescriptorGroup(sd, &pSid, &bDefaulted))        return FALSE;    if(pSid != NULL) {        if(!IsValidSid(pSid)) return FALSE;    }    return TRUE;}static VOID GetRemotePrivilegesSet(char *FileName, PDWORD dwRemotePrivileges){    HANDLE hFile;    *dwRemotePrivileges = 0;    /* see if we have the SeRestorePrivilege */    hFile = CreateFileA(        FileName,        ACCESS_SYSTEM_SECURITY | WRITE_DAC | WRITE_OWNER | READ_CONTROL,        FILE_SHARE_READ | FILE_SHARE_DELETE, /* no sd updating allowed here */        NULL,        OPEN_EXISTING,        FILE_FLAG_BACKUP_SEMANTICS,        NULL        );    if(hFile != INVALID_HANDLE_VALUE) {        /* no remote way to determine SeRestorePrivilege -- just try a           read/write to simulate it */        SECURITY_INFORMATION si = DACL_SECURITY_INFORMATION |          SACL_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION |          GROUP_SECURITY_INFORMATION;        PSECURITY_DESCRIPTOR sd;        DWORD cbBuf = 0;        GetKernelObjectSecurity(hFile, si, NULL, cbBuf, &cbBuf);        if(ERROR_INSUFFICIENT_BUFFER == GetLastError()) {            if((sd = HeapAlloc(GetProcessHeap(), 0, cbBuf)) != NULL) {                if(GetKernelObjectSecurity(hFile, si, sd, cbBuf, &cbBuf)) {                    if(SetKernelObjectSecurity(hFile, si, sd))                        *dwRemotePrivileges |= OVERRIDE_RESTORE;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲视频系列| 国产欧美日韩综合精品一区二区| 激情成人午夜视频| 日韩和的一区二区| 一级中文字幕一区二区| 综合婷婷亚洲小说| 欧美精品一区二区高清在线观看| 在线欧美一区二区| 99精品视频中文字幕| 国产河南妇女毛片精品久久久 | 99国产精品一区| 丁香婷婷深情五月亚洲| 国产suv精品一区二区三区| 99久久99久久免费精品蜜臀| 经典三级在线一区| 欧美精品日韩一本| 日韩欧美国产一区二区在线播放| 欧美一区二区精品| 日韩精品一区二区三区四区 | 99国产精品久久久久| 日本韩国欧美一区二区三区| 日韩欧美中文一区二区| 欧美日韩另类国产亚洲欧美一级| a级高清视频欧美日韩| 成人自拍视频在线| 国产aⅴ综合色| 国产成人午夜高潮毛片| 精品一区二区三区视频| 五月婷婷欧美视频| 久久精品国产免费| 成人综合在线视频| 欧美乱熟臀69xxxxxx| 日韩一级精品视频在线观看| xnxx国产精品| 亚洲欧美视频在线观看视频| 亚洲午夜电影在线| 紧缚捆绑精品一区二区| 色综合久久综合| 久久日韩精品一区二区五区| 免费在线观看成人| 国产一区欧美日韩| 国产高清不卡一区| 精品黑人一区二区三区久久 | 国产老妇另类xxxxx| 欧美日韩亚洲综合| 国产精品久久久久永久免费观看| 一区二区三区四区视频精品免费 | 欧美日韩免费一区二区三区 | 亚洲一线二线三线视频| 亚洲国产另类精品专区| 日韩视频在线你懂得| 欧美日韩一区二区电影| 成年人网站91| 九九国产精品视频| 一区二区中文视频| 久久久久久久久久久久久女国产乱| 免费看欧美女人艹b| 91浏览器在线视频| 日韩理论电影院| 欧美国产精品v| 日韩免费一区二区| 国产精品青草综合久久久久99| 又紧又大又爽精品一区二区| 国产在线视频一区二区| 日韩精品一区二区三区视频播放| 丝袜亚洲另类欧美综合| 欧美极品aⅴ影院| 亚洲电影视频在线| 成人激情开心网| 国产精品网站在线| 成人短视频下载| 97se亚洲国产综合自在线不卡| 91黄色激情网站| 色美美综合视频| 欧美精品日韩精品| 一区二区三区不卡在线观看 | 亚洲电影在线播放| 国产a视频精品免费观看| 精品少妇一区二区三区免费观看| 中文字幕一区二区在线观看| 麻豆传媒一区二区三区| 在线成人免费视频| 婷婷开心激情综合| 色综合天天视频在线观看 | 26uuu成人网一区二区三区| 一区二区三区成人| 欧美日韩在线一区二区| 亚洲成人综合视频| 在线电影一区二区三区| 日韩国产精品久久久久久亚洲| 欧美三电影在线| 日韩国产精品大片| eeuss鲁片一区二区三区| 欧美特级限制片免费在线观看| 国产午夜精品一区二区三区嫩草| 国产精品第四页| 99久久伊人精品| 欧美艳星brazzers| 一区二区日韩电影| 91精品午夜视频| 日韩一区二区精品葵司在线| 亚洲日本韩国一区| 日日骚欧美日韩| 波多野结衣一区二区三区| 亚洲一区av在线| 欧美日韩久久一区| 日本麻豆一区二区三区视频| 99精品视频一区| 中文字幕日韩一区| 99久久综合色| 调教+趴+乳夹+国产+精品| 精品久久久久久综合日本欧美| 国产一区二区精品在线观看| 日韩伦理免费电影| 日韩欧美国产一区在线观看| 99视频有精品| 日本成人在线电影网| 亚洲丝袜自拍清纯另类| 欧美视频在线观看一区二区| 日本亚洲天堂网| 国产精品久久久久久久久免费樱桃 | 国产又粗又猛又爽又黄91精品| 亚洲美女在线一区| 久久午夜羞羞影院免费观看| 欧美精品欧美精品系列| 欧美性一二三区| 国产成人精品免费在线| 麻豆国产欧美一区二区三区| 亚洲综合激情另类小说区| 日本一区二区动态图| 精品国产乱码久久久久久免费 | 欧美一区二区视频免费观看| 国产91高潮流白浆在线麻豆| 亚洲男人都懂的| 久久久精品日韩欧美| ww亚洲ww在线观看国产| 久久久无码精品亚洲日韩按摩| 日韩一级二级三级| 欧美成人精品1314www| 欧美另类高清zo欧美| 欧美猛男超大videosgay| 在线电影国产精品| 日韩一区二区在线看片| 日韩视频在线你懂得| 亚洲精品一区二区三区四区高清| 久久免费偷拍视频| 国产中文字幕精品| 婷婷激情综合网| 久草中文综合在线| 天堂一区二区在线| 男人的j进女人的j一区| 国产在线精品国自产拍免费| 不卡的av在线| 2023国产精品视频| 亚洲成av人片在线| 99精品国产91久久久久久 | 欧美色老头old∨ideo| 国产日韩欧美a| 六月丁香婷婷色狠狠久久| 99视频热这里只有精品免费| 日韩精品一区在线| 亚洲18色成人| 99久精品国产| 国产精品免费人成网站| 久久97超碰色| 日韩视频一区二区| 亚洲第一综合色| 欧美日韩国产免费| 亚洲一线二线三线久久久| 色呦呦日韩精品| 亚洲色图欧洲色图婷婷| 91美女片黄在线观看91美女| 国产精品视频一二三| av成人老司机| 亚洲在线观看免费视频| 色八戒一区二区三区| 亚洲三级在线免费观看| 色综合中文字幕| 一区二区成人在线| 欧美在线观看视频一区二区三区| 亚洲视频在线一区观看| 一本久道中文字幕精品亚洲嫩| 一区二区日韩av| 91麻豆精品国产| 国产精品1区2区3区| 国产精品色哟哟| 91免费观看在线| 婷婷综合五月天| 久久久www免费人成精品| 风间由美一区二区三区在线观看 | 日韩美女主播在线视频一区二区三区| 日本不卡123| 中文字幕国产一区二区| 99久久久精品| 奇米影视在线99精品| 国产日韩欧美精品在线| 欧美三级中文字幕在线观看| 久久精品国产**网站演员| 国产精品热久久久久夜色精品三区| 91无套直看片红桃|