fixed plug-ins directory initialization for extremely restricted guest users with no directory listing access to the temporary directory
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3909 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
18a03a5eb5
commit
a7e4a69bb4
3 changed files with 9 additions and 2 deletions
|
@ -3216,8 +3216,8 @@ again:
|
||||||
// GetTempFileName $0
|
// GetTempFileName $0
|
||||||
ret=add_entry_direct(EW_GETTEMPFILENAME, var_zero, add_string("$TEMP"));
|
ret=add_entry_direct(EW_GETTEMPFILENAME, var_zero, add_string("$TEMP"));
|
||||||
if (ret != PS_OK) return ret;
|
if (ret != PS_OK) return ret;
|
||||||
// Delete $0 - the temp file created
|
// Delete $0 [simple, nothing that could clash with special temp permissions]
|
||||||
ret=add_entry_direct(EW_DELETEFILE, zero_offset);
|
ret=add_entry_direct(EW_DELETEFILE, zero_offset, DEL_SIMPLE);
|
||||||
if (ret != PS_OK) return ret;
|
if (ret != PS_OK) return ret;
|
||||||
// CraeteDirectory $0 - a dir instead of that temp file
|
// CraeteDirectory $0 - a dir instead of that temp file
|
||||||
ret=add_entry_direct(EW_CREATEDIR, zero_offset);
|
ret=add_entry_direct(EW_CREATEDIR, zero_offset);
|
||||||
|
|
|
@ -442,6 +442,7 @@ typedef struct {
|
||||||
#define DEL_DIR 1
|
#define DEL_DIR 1
|
||||||
#define DEL_RECURSE 2
|
#define DEL_RECURSE 2
|
||||||
#define DEL_REBOOT 4
|
#define DEL_REBOOT 4
|
||||||
|
#define DEL_SIMPLE 8
|
||||||
|
|
||||||
// $0..$9, $INSTDIR, etc are encoded as ASCII bytes starting from this value.
|
// $0..$9, $INSTDIR, etc are encoded as ASCII bytes starting from this value.
|
||||||
// Added by ramon 3 jun 2003
|
// Added by ramon 3 jun 2003
|
||||||
|
|
|
@ -103,6 +103,12 @@ void NSISCALL myDelete(char *buf, int flags)
|
||||||
char *fn;
|
char *fn;
|
||||||
int valid_dir=is_valid_instpath(buf);
|
int valid_dir=is_valid_instpath(buf);
|
||||||
|
|
||||||
|
if ((flags & DEL_SIMPLE))
|
||||||
|
{
|
||||||
|
g_exec_flags.exec_error += !DeleteFile(buf);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef NSIS_SUPPORT_RMDIR
|
#ifdef NSIS_SUPPORT_RMDIR
|
||||||
if (!(flags & DEL_DIR) || (valid_dir && (flags & DEL_RECURSE)))
|
if (!(flags & DEL_DIR) || (valid_dir && (flags & DEL_RECURSE)))
|
||||||
#endif//NSIS_SUPPORT_RMDIR
|
#endif//NSIS_SUPPORT_RMDIR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue