From df6cc9b5c923e79d19c96e84eaf755676691e4ed Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 30 Aug 2019 21:03:07 +0200 Subject: [PATCH] BRoster: dereference symlinks when building RosterAppInfo Should fix #15313 Change-Id: Ibd1d4f4195d794841ecddf3534177982cf894bcb Reviewed-on: https://review.haiku-os.org/c/haiku/+/1803 Reviewed-by: waddlesplash --- src/servers/registrar/RosterAppInfo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/servers/registrar/RosterAppInfo.cpp b/src/servers/registrar/RosterAppInfo.cpp index 7e012a03ec..176c8a2fb1 100644 --- a/src/servers/registrar/RosterAppInfo.cpp +++ b/src/servers/registrar/RosterAppInfo.cpp @@ -10,6 +10,9 @@ #include #include +#include +#include + using std::nothrow; @@ -33,7 +36,9 @@ RosterAppInfo::Init(thread_id thread, team_id team, port_id port, uint32 flags, this->team = team; this->port = port; this->flags = flags; - this->ref = *ref; + BEntry entry(ref, true); + if (entry.GetRef(&this->ref) != B_OK) + this->ref = *ref; if (signature) strlcpy(this->signature, signature, B_MIME_TYPE_LENGTH); else