Skip to content

Commit

Permalink
bumped to 3.2; added some additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
twocanoes committed Jun 23, 2023
1 parent df5f111 commit 5a54485
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
8 changes: 5 additions & 3 deletions XCredsLoginPlugIn/Mechanisms/XCredsCreateUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ class XCredsCreateUser: XCredsBaseMechanism {
func createUser(shortName: String, first: String, last: String, fullName:String?, pass: String?, uid: String, gid: String, canChangePass: Bool, isAdmin: Bool, customAttributes: [String:String], secureTokenCreds: SecureTokenCredential?) {
var newRecord: ODRecord?
os_log("Creating new local account for: %{public}@", log: createUserLog, type: .default, shortName)
// os_log("New user attributes. first: %{public}@, last: %{public}@, uid: %{public}@, gid: %{public}@, canChangePass: %{public}@, isAdmin: %{public}@, customAttributes: %{public}@", log: createUserLog, type: .debug, first, last, uid, gid, canChangePass.description, isAdmin.description, customAttributes)


// note for anyone following behind me
// you need to specify the attribute values in an array
// regardless of if there's more than one value or not
Expand Down Expand Up @@ -224,6 +223,7 @@ class XCredsCreateUser: XCredsBaseMechanism {
// let picData = NSData(contentsOf: picURL)
// let picString = picData?.description ?? ""


var attrs: [AnyHashable:Any] = [
kODAttributeTypeFullName: [userFullName],
kODAttributeTypeNFSHomeDirectory: [ "/Users/" + shortName ],
Expand Down Expand Up @@ -251,7 +251,9 @@ class XCredsCreateUser: XCredsBaseMechanism {
if let signInTime = getHint(type: .networkSignIn) {
attrs[kODAttributeNetworkSignIn] = [signInTime]
}


os_log("New user attributes. first: %{public}@, last: %{public}@, uid: %{public}@, gid: %{public}@, canChangePass: %{public}@, isAdmin: %{public}@, customAttributes: %{public}@", log: createUserLog, type: .debug, first, last, uid, gid, canChangePass.description, isAdmin.description, attrs.debugDescription)

do {
os_log("Creating user account in local ODNode", log: createUserLog, type: .debug)
let node = try ODNode.init(session: session, type: ODNodeType(kODNodeTypeLocalNodes))
Expand Down
24 changes: 12 additions & 12 deletions xCreds.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 4182;
CURRENT_PROJECT_VERSION = 4183;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = UXP6YEHSPW;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1250,7 +1250,7 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MARKETING_VERSION = 3.1;
MARKETING_VERSION = 3.2;
PRODUCT_BUNDLE_IDENTIFIER = com.twocanoes.XCredsLoginPlugin;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1270,7 +1270,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 4182;
CURRENT_PROJECT_VERSION = 4183;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = UXP6YEHSPW;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1287,7 +1287,7 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MARKETING_VERSION = 3.1;
MARKETING_VERSION = 3.2;
PRODUCT_BUNDLE_IDENTIFIER = com.twocanoes.XCredsLoginPlugin;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1389,7 +1389,7 @@
CODE_SIGN_ENTITLEMENTS = "XCreds Login Overlay/XCreds_Login_Overlay.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 4182;
CURRENT_PROJECT_VERSION = 4183;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1405,7 +1405,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 3.1;
MARKETING_VERSION = 3.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.twocanoes.XCreds-Login-Overlay";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1425,7 +1425,7 @@
CODE_SIGN_ENTITLEMENTS = "XCreds Login Overlay/XCreds_Login_Overlay.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 4182;
CURRENT_PROJECT_VERSION = 4183;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1441,7 +1441,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 3.1;
MARKETING_VERSION = 3.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.twocanoes.XCreds-Login-Overlay";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1574,7 +1574,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 4182;
CURRENT_PROJECT_VERSION = 4183;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1591,7 +1591,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 3.1;
MARKETING_VERSION = 3.2;
PRODUCT_BUNDLE_IDENTIFIER = com.twocanoes.xcreds;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
Expand All @@ -1610,7 +1610,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 4182;
CURRENT_PROJECT_VERSION = 4183;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1627,7 +1627,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 3.1;
MARKETING_VERSION = 3.2;
PRODUCT_BUNDLE_IDENTIFIER = com.twocanoes.xcreds;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<key>auth_mech_fixup.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
<integer>8</integer>
</dict>
<key>authrights.xcscheme_^#shared#^_</key>
<dict>
Expand All @@ -42,7 +42,7 @@
<key>test.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
<integer>7</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
Expand Down

0 comments on commit 5a54485

Please sign in to comment.