Lines Matching defs:user

139 // user specific directory and the backing store file be stored in either a
146 // user specific directory and the shared memory backing store file.
152 // return the user specific temporary directory name.
156 static char* get_user_tmp_dir(const char* user) {
160 size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3;
163 // construct the path name to user specific tmp directory
164 _snprintf(dirname, nbytes, "%s\\%s_%s", tmpdir, perfdir, user);
229 // we don't accept any redirection for the user specific directory
261 // return the user name for the owner of this process
267 /* get the user name. This code is adapted from code found in
273 char* user = getenv("USERNAME");
276 if (user == NULL || strlen(user) == 0) {
278 user = buf;
285 char* user_name = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal);
286 strcpy(user_name, user);
291 // return the name of the user that owns the process identified by vmid.
294 // store file for the specified vmid and returns the user name, as determined
295 // by the user name suffix of the hsperfdata_<username> directory name.
316 // to determine the user name for the process id.
380 // save the user name. The newer creation time indicates that
389 // name of the user that owns the process associated with vmid
395 char* user = strchr(dentry->d_name, '_') + 1;
398 latest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal);
400 strcpy(latest_user, user);
417 // return the name of the user that owns the process identified by vmid.
426 // to provide a fast process id to user name mapping function using
439 // named shared memory region for the given user name and vmid.
446 static char *get_sharedmem_objectname(const char* user, int vmid) {
450 int nbytes = (int)strlen(PERFDATA_NAME) + (int)strlen(user) + 3;
458 _snprintf(name, nbytes, "%s_%s_%u", PERFDATA_NAME, user, vmid);
464 // shared memory region for the given user name and vmid.
612 // the named user temporary directory. It scans the named directory
620 // open the user temp directory
636 // for this user may start and/or terminate during this search and
718 // owned by this or some other user and cannot be removed until
774 // get the user SID for the process indicated by the process handle
795 // the user token information from the access token.
811 // get the user token information
1089 // access control list that creates a set access rights for the user/owner
1103 // initialize the user ace data
1159 // access to the user temporary directory.
1167 // create full access rights for the user/owner of the directory
1187 // create extensive access rights for the user/owner of the file
1208 // create extensive access rights for the user/owner of the shared
1220 // make the user specific temporary directory
1298 // create the user temporary directory
1439 // get the name of the user associated with this process
1440 char* user = get_user_name();
1442 if (user == NULL) {
1446 // construct the name of the user specific temporary directory
1447 char* dirname = get_user_tmp_dir(user);
1458 char* objectname = get_sharedmem_objectname(user, vmid);
1466 FREE_C_HEAP_ARRAY(char, user, mtInternal);
1576 static void open_file_mapping(const char* user, int vmid,
1607 // if a user name wasn't specified, then find the user name for
1609 if (user == NULL || strlen(user) == 0) {
1613 luser = user;
1618 "Could not map vmid to user name");
1647 if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal);
1765 // If user specifies PerfDataSaveFile, it will save the performance data
1796 void PerfMemory::attach(const char* user, int vmid, PerfMemoryMode mode,
1805 open_file_mapping(user, vmid, mode, addrp, sizep, CHECK);