Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions mdstcpip/mdsipshr/CheckClient.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ static int become_user(const char *remote_user,
else
user = local_user;
struct passwd *pwd = user ? getpwnam(user) : 0;
// On macOS Ventura, searching for "unknown" in password list
// returns default "_unknown" user, which should be ignored.
#ifdef __APPLE__
if (pwd && (strcmp("_unknown", pwd->pw_name) == 0)) {
pwd = 0;
}
#endif
if (!pwd && user == remote_user)
{
int i;
Expand All @@ -102,6 +109,11 @@ static int become_user(const char *remote_user,
lowuser[i] = tolower(remote_user[i]);
pwd = getpwnam(lowuser);
free(lowuser);
#ifdef __APPLE__
if (pwd && (strcmp("_unknown", pwd->pw_name) == 0)) {
pwd = 0;
}
#endif
}
int access;
if (pwd)
Expand Down
4 changes: 2 additions & 2 deletions tditest/testing/do_tditests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ if [ ! -z $1 ]; then
if [[ $test == *"dev"* ]]; then
found=0
for path in ${LD_LIBRARY_PATH//:/ }; do
if [ -e $path/libMitDevices.so ]; then
if [ -e $path/libMitDevices.so ] || [ -e $path/libMitDevices.dylib ]; then
found=1
fi
done
if [ $found == 0 ]; then
echo no libMitDevices.so
echo "no libMitDevices.so or no libMitDevices.dylib (macOS)"
exit 77
fi
fi
Expand Down