Skip to content

Commit ec4f9ce

Browse files
committed
Fill in logging
1 parent 2de5987 commit ec4f9ce

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

src/Shared/CertificateGeneration/CertificateManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,9 @@ public sealed class CertificateManagerEventSource : EventSource
10751075

10761076
[Event(71, Level = EventLevel.Warning, Message = "The on-disk store directory was not found.")]
10771077
internal void MacOSDiskStoreDoesNotExist() => WriteEvent(71);
1078+
1079+
[Event(72, Level = EventLevel.Warning, Message = "Directory '{0}' may be readable by other users.")]
1080+
internal void DirectoryPermissionsNotSecure(string directoryPath) => WriteEvent(72, directoryPath);
10781081
}
10791082

10801083
internal sealed class UserCancelledTrustException : Exception

src/Shared/CertificateGeneration/MacOSCertificateManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ protected override void CreateDirectoryWithPermissions(string directoryPath)
487487
{
488488
if ((dirInfo.UnixFileMode & ~DirectoryPermissions) != 0)
489489
{
490-
// TODO (acasey): Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
490+
Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
491491
}
492492
}
493493
else

src/Shared/CertificateGeneration/UnixCertificateManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected override void CreateDirectoryWithPermissions(string directoryPath)
8080
{
8181
if ((dirInfo.UnixFileMode & ~DirectoryPermissions) != 0)
8282
{
83-
// TODO (acasey): Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
83+
Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
8484
}
8585
}
8686
else

src/Shared/CertificateGeneration/WindowsCertificateManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ protected override void CreateDirectoryWithPermissions(string directoryPath)
158158
// is to allow access to anyone other than the current user, system, or administrators
159159
// is very complicated. We're not going to do anything but log, so an approximation
160160
// is fine.
161-
// TODO (acasey): Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
161+
Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
162162
break;
163163
}
164164
}

0 commit comments

Comments
 (0)