changed requested access permissions for accessing the Windows registry from a general access value of KEY_ALL_ACCESS to a more specific access that does not necessarily require admin previlidges. r=sgehani@netscape.com. This affects only windows.

This commit is contained in:
ssu%netscape.com 1999-12-02 02:22:35 +00:00
Родитель 30fa8e4460
Коммит e4f7f8163d
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -281,7 +281,7 @@ nsWinReg::NativeCreateKey(const nsString& subkey, const nsString& classname)
#ifdef WIN32
root = (HKEY)mRootKey;
result = RegCreateKeyEx(root, subkeyCString, 0, classnameCString, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, nsnull, &newkey, &disposition);
result = RegCreateKeyEx(root, subkeyCString, 0, classnameCString, REG_OPTION_NON_VOLATILE, KEY_WRITE, nsnull, &newkey, &disposition);
if(ERROR_SUCCESS == result)
{
@ -354,7 +354,7 @@ nsWinReg::NativeSetValueString(const nsString& subkey, const nsString& valname,
length = value.Length();
root = (HKEY) mRootKey;
result = RegOpenKeyEx( root, subkeyCString, 0, KEY_ALL_ACCESS, &newkey);
result = RegOpenKeyEx( root, subkeyCString, 0, KEY_WRITE, &newkey);
if(ERROR_SUCCESS == result)
{
@ -412,7 +412,7 @@ nsWinReg::NativeSetValueNumber(const nsString& subkey, const nsString& valname,
char* valnameCString = valname.ToNewCString();
root = (HKEY) mRootKey;
result = RegOpenKeyEx( root, subkeyCString, 0, KEY_ALL_ACCESS, &newkey);
result = RegOpenKeyEx( root, subkeyCString, 0, KEY_WRITE, &newkey);
if(ERROR_SUCCESS == result)
{
@ -473,7 +473,7 @@ nsWinReg::NativeSetValue(const nsString& subkey, const nsString& valname, nsWinR
root = (HKEY) mRootKey;
result = RegOpenKeyEx( root, subkeyCString, 0, KEY_ALL_ACCESS, &newkey );
result = RegOpenKeyEx( root, subkeyCString, 0, KEY_WRITE, &newkey );
if(ERROR_SUCCESS == result)
{
@ -510,7 +510,7 @@ nsWinReg::NativeGetValue(const nsString& subkey, const nsString& valname)
char* valnameCString = valname.ToNewCString();
root = (HKEY) mRootKey;
result = RegOpenKeyEx( root, subkeyCString, 0, KEY_ALL_ACCESS, &newkey );
result = RegOpenKeyEx( root, subkeyCString, 0, KEY_READ, &newkey );
if(ERROR_SUCCESS == result)
{