pike.git / src / modules / system / nt.c

version» Context lines:

pike.git/src/modules/system/nt.c:909:    case 4: logontype=sp[3-args].u.integer;    case 3:    case 2:    case 1:    case 0: break;    }       THREADS_ALLOW();    ret=logonuser(username, domain, pw, logontype, logonprovider, &x);    THREADS_DISALLOW(); +  pop_n_elems(args);    if(ret)    {    struct object *o; -  pop_n_elems(args); -  o=low_clone(token_program); +  o=fast_clone_object(token_program);    (*(HANDLE *)(o->storage))=x;    push_object(o);    }else{    errno=GetLastError(); -  pop_n_elems(args); +     push_int(0);    }   }      static void init_token(struct object *o)   {    THIS_TOKEN = INVALID_HANDLE_VALUE;   }      static void exit_token(struct object *o)
pike.git/src/modules/system/nt.c:1179:    {    case 0: low_encode_localgroup_users_info_0 ((LOCALGROUP_USERS_INFO_0 *) u);break;    default:    Pike_error("Unsupported LOCALGROUPUSERSINFO level.\n");    }   }      static void low_encode_localgroup_members_info_0(LOCALGROUP_MEMBERS_INFO_0 *tmp)   {    - #define SAFE_PUSH_SID(X) do { \ -  if(getlengthsid && (X) && sid_program) { \ -  int lentmp=getlengthsid( (X) ); \ -  PSID psidtmp=xalloc(lentmp); \ -  struct object *o=low_clone(sid_program); \ -  memcpy( psidtmp, (X), lentmp); \ -  (*(PSID *)(o->storage))=psidtmp; \ -  push_object(o); \ -  } else { \ -  push_int(0); \ + #define SAFE_PUSH_SID(X) do { \ +  if(getlengthsid && (X) && sid_program) { \ +  int lentmp=getlengthsid( (X) ); \ +  PSID psidtmp=xalloc(lentmp); \ +  struct object *o=fast_clone_object(sid_program); \ +  memcpy( psidtmp, (X), lentmp); \ +  (*(PSID *)(o->storage))=psidtmp; \ +  push_object(o); \ +  } else { \ +  push_int(0); \    } } while(0)       SAFE_PUSH_SID(tmp->lgrmi0_sid);   }      static void low_encode_localgroup_members_info_1(LOCALGROUP_MEMBERS_INFO_1 *tmp)   {    low_encode_localgroup_members_info_0((LOCALGROUP_MEMBERS_INFO_0 *)tmp);    push_int(tmp->lgrmi1_sidusage);    SAFE_PUSH_WSTR(tmp->lgrmi1_name);
pike.git/src/modules/system/nt.c:2972:    if(lookupaccountname(sys,    acc,    sid,    &sidlen,    (LPTSTR)(STR0(dom)),    &domainlen,    &tmp))    {    struct object *o;    pop_n_elems(args); -  o=low_clone(sid_program); +  o=fast_clone_object(sid_program);    (*(PSID *)(o->storage))=sid;    push_object(o);    push_string(end_shared_string(dom));    push_int(tmp);    f_aggregate(3);    return;    }    free(dom);    free(sid);    }