Skip to content
Closed
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
3 changes: 3 additions & 0 deletions tcl/tcl_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ static char *mds_owner( /* Return: ptr to "user" string
#endif
#ifdef HAVE_GETPWUID
struct passwd *p = getpwuid(uid);
if (!p) {
p = getpwuid(owner);
}
if (p)
{
username = alloca(strlen(p->pw_name) + 3);
Expand Down
6 changes: 5 additions & 1 deletion treeshr/TreePutRecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ int _TreePutRecord(void *dbid, int nid, struct descriptor *descriptor_ptr,
int compress_utility = utility_update == 2;
#ifndef _WIN32
if (!saved_uic)
saved_uic = (getgid() << 16) | getuid();
{
saved_uic = getuid();
if (!(saved_uic & 0xFFFF0000))
saved_uic = (getgid() << 16) | (saved_uic);
}
#endif
if (!(IS_OPEN(dblist)))
return TreeNOT_OPEN;
Expand Down
9 changes: 8 additions & 1 deletion treeshr/TreeSegments.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,14 @@ inline static int begin_finish(vars_t *vars)

#ifndef _WIN32
static int saved_uic = 0;
static void init_saved_uic() { saved_uic = (getgid() << 16) | getuid(); }
static void init_saved_uic() {
if (!saved_uic)
{
saved_uic = getuid();
if (!(saved_uic & 0xFFFF0000))
saved_uic = (getgid() << 16) | (saved_uic);
}
}
#endif
inline static void begin_local_nci(vars_t *vars,
const mdsdsc_a_t *initialValue)
Expand Down