View Issue Details

IDProjectCategoryView StatusLast Update
0000502Far ManagerViewerpublic2011-04-03 21:48
ReporteralexmitinAssigned ToDrKnS 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version3.0 
Summary0000502: apiCreateFile rights for the Viewer
DescriptionThere is an access denied error when the user tries to view a file when he (the user account) has only the following permissions for the file:

  List Folder/Read Data

The minimum set of rights to view the file should be the following:

  Reading: FILE_READ_DATA

The following places should be updated:

int Viewer::OpenFile(const wchar_t *Name,int warning)
{
...
  HANDLE hView = apiCreateFile(
    strFileName,
    FILE_READ_DATA, //<== was GENERIC_READ,
    ShareMode,
    NULL,
    OPEN_EXISTING,
    Flags,
    NULL
  );
  if (hView==INVALID_HANDLE_VALUE && Flags!=0)
  {
    hView = apiCreateFile(
      strFileName,
      FILE_READ_DATA, //<== was GENERIC_READ,
      ShareMode,
      NULL,
      OPEN_EXISTING,
      0,
      NULL
    );
  }
...
}
Additional InformationFAR 1.80.0.452
TagsNo tags attached.
Build1939

Activities

vskirdin

2008-03-20 12:33

administrator   bugnote:0001381

Стоп. Сдается мне, что уже была смена FILE_READ_DATA <=> GENERIC_READ (здесь, на мантисе, речь шла...)

Denis

2008-03-20 17:18

reporter   bugnote:0001386

На 453 под Vista/32 не вопроизводится - Far его открывает.

alexmitin

2008-03-20 18:34

reporter   bugnote:0001390

See 0000504:0001389 in the 0000504 for the information how to set the initial permissions for the user account to test with.

2useven10

2011-03-31 19:23

developer   bugnote:0006652

Last edited: 2011-03-31 22:25

View 2 revisions

Можно и поменять. Я разницы не заметил (то что открывалось с GENERIC_READ, открывается и с FILE_READ_DATA), а запрашиваемые права меньше...

Issue History

Date Modified Username Field Change
2008-03-20 00:42 alexmitin New Issue
2008-03-20 12:33 vskirdin Note Added: 0001381
2008-03-20 17:18 Denis Note Added: 0001386
2008-03-20 18:34 alexmitin Note Added: 0001390
2008-11-21 14:07 alexy Status new => assigned
2008-11-21 14:07 alexy Assigned To => vskirdin
2010-05-03 01:50 alexy Assigned To vskirdin =>
2010-05-03 01:50 alexy Status assigned => new
2011-03-31 19:23 2useven10 Note Added: 0006652
2011-03-31 22:25 2useven10 Note Edited: 0006652 View Revisions
2011-04-03 21:48 DrKnS Build => 1939
2011-04-03 21:48 DrKnS Status new => closed
2011-04-03 21:48 DrKnS Assigned To => DrKnS
2011-04-03 21:48 DrKnS Resolution open => fixed
2011-04-03 21:48 DrKnS Fixed in Version => 3.0