From a603dadba36cdb5e74a9c2860491c059d13f2482 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Thu, 12 Jan 2006 03:57:58 +0000 Subject: [PATCH] Revert PeerCred back to Mono.Posix namespace --- CASA.changes | 6 ++++++ c_micasad/common/UnixUser.cs | 3 ++- c_micasad/communication/UnixIPCChannel.cs | 4 +++- c_micasad/lss/CASACrypto.cs | 6 +++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CASA.changes b/CASA.changes index f94d1c90..8997c4ec 100644 --- a/CASA.changes +++ b/CASA.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 11 21:50:59 MST 2006 - jnorman@novell.com + +- Revert Mono.Unix.PeerCred back to Mono.Posix.PeerCred to run + on MONO 1.1.13 + ------------------------------------------------------------------- Wed Jan 11 20:31:12 IST 2006 - smanojna@novell.com diff --git a/c_micasad/common/UnixUser.cs b/c_micasad/common/UnixUser.cs index 598d3f35..1bbcd41b 100644 --- a/c_micasad/common/UnixUser.cs +++ b/c_micasad/common/UnixUser.cs @@ -34,7 +34,8 @@ namespace sscs.common override internal string GetUserHomeDir() { uint uid = (uint)userId.GetUID(); - return Mono.Unix.UnixUser.GetHomeDirectory(uid); + Mono.Unix.UnixUserInfo uui = new Mono.Unix.UnixUserInfo(uid); + return uui.HomeDirectory; } diff --git a/c_micasad/communication/UnixIPCChannel.cs b/c_micasad/communication/UnixIPCChannel.cs index 36c7e97c..fe8546ec 100644 --- a/c_micasad/communication/UnixIPCChannel.cs +++ b/c_micasad/communication/UnixIPCChannel.cs @@ -24,7 +24,9 @@ class UnixIPCChannel : IPCChannel { CSSSLogger.ExecutionTrace(this); clientSocket = connectedSocket; - PeerCred cred = new PeerCred(connectedSocket); + Mono.Posix.PeerCred cred; + cred = new Mono.Posix.PeerCred(connectedSocket); + userId = new UnixUserIdentifier(cred.UserID); } diff --git a/c_micasad/lss/CASACrypto.cs b/c_micasad/lss/CASACrypto.cs index dfbaa932..803a5c25 100644 --- a/c_micasad/lss/CASACrypto.cs +++ b/c_micasad/lss/CASACrypto.cs @@ -47,7 +47,7 @@ namespace sscs.crypto //Encrypt the data to a file fsEncrypt = new FileStream(fileName, FileMode.Create); #if LINUX - Mono.Unix.Syscall.chmod(fileName,Mono.Unix.FilePermissions.S_IRUSR | Mono.Unix.FilePermissions.S_IWUSR); + Mono.Unix.Native.Syscall.chmod(fileName,Mono.Unix.Native.FilePermissions.S_IRUSR | Mono.Unix.Native.FilePermissions.S_IWUSR); #endif // make hidden File.SetAttributes(fileName, FileAttributes.Hidden); @@ -154,7 +154,7 @@ namespace sscs.crypto //Encrypt the data to a file fsEncrypt = new FileStream(fileName, FileMode.Create); #if LINUX - Mono.Unix.Syscall.chmod(fileName,Mono.Unix.FilePermissions.S_IRUSR | Mono.Unix.FilePermissions.S_IWUSR); + Mono.Unix.Native.Syscall.chmod(fileName,Mono.Unix.Native.FilePermissions.S_IRUSR | Mono.Unix.Native.FilePermissions.S_IWUSR); #endif // make hidden File.SetAttributes(fileName, FileAttributes.Hidden); @@ -361,7 +361,7 @@ namespace sscs.crypto //Encrypt the data to a file fsEncrypt = new FileStream(fileName,FileMode.Create); #if LINUX - Mono.Unix.Syscall.chmod(fileName,Mono.Unix.FilePermissions.S_IRUSR | Mono.Unix.FilePermissions.S_IWUSR); + Mono.Unix.Native.Syscall.chmod(fileName,Mono.Unix.Native.FilePermissions.S_IRUSR | Mono.Unix.Native.FilePermissions.S_IWUSR); #endif // make hidden File.SetAttributes(fileName, FileAttributes.Hidden);