Bug 193889 - .miCASA files are RW for user only

This commit is contained in:
Jim Norman 2007-02-01 17:28:55 +00:00
parent 69f772ed91
commit 4872424328
3 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 1 10:18:48 MST 2007 - jnorman@novell.com
- Bug 193889. .miCASA files are RW for user only
-------------------------------------------------------------------
Wed Jan 31 15:48:56 MST 2007 - schoi@novell.com

View File

@ -90,6 +90,13 @@ namespace sscs.cache
internal SecretStore(User ssUser)
{
#if LINUX
Mono.Unix.Native.Syscall.umask(Mono.Unix.Native.FilePermissions.S_IRGRP |
Mono.Unix.Native.FilePermissions.S_IWGRP |
Mono.Unix.Native.FilePermissions.S_IROTH |
Mono.Unix.Native.FilePermissions.S_IWOTH);
#endif
secretStoreName = ssUser.GetUserName();
version = 1;
state = STATE_NOT_DEFINED;

View File

@ -169,6 +169,13 @@ public class ICASAPol
fs.Close();
writer.Close();
*/
#if LINUX
Mono.Unix.Native.Syscall.umask(Mono.Unix.Native.FilePermissions.S_IRGRP |
Mono.Unix.Native.FilePermission.S_IWGRP |
Mono.Unix.Native.FilePermission.S_IROTH |
Mono.Unix.Native.FilePermission.S_IWOTH);
#endif
XmlTextWriter writer = new XmlTextWriter(GetPolicyFilePath(),null);
writer.Formatting = Formatting.Indented;
doc.Save(writer);