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

version» Context lines:

pike.git/src/modules/system/passwords.c:178: Inside #if defined(HAVE_GETPWNAM) || defined(HAVE_GETPWUID) || defined(HAVE_GETPWENT)
   /* getspnam() is MT-unsafe!    * /grubba 1999-05-26    */    /* THREADS_ALLOW_UID(); */    foo = getspnam(ent->pw_name);    /* THREADS_DISALLOW_UID(); */   #endif /* HAVE_GETSPNAM_R */    if(foo)    push_text(foo->sp_pwdp);    else -  push_text("x"); +  push_static_text("x");    } else   #endif /* Shadow password support */    SAFE_PUSH_TEXT(ent->pw_passwd);       push_int(ent->pw_uid);    push_int(ent->pw_gid);      #ifdef HAVE_PW_GECOS    SAFE_PUSH_TEXT(ent->pw_gecos);   #else /* !HAVE_PW_GECOS */ -  push_text("Mister Anonymous"); +  push_static_text("Mister Anonymous");   #endif /* HAVE_PW_GECOS */    SAFE_PUSH_TEXT(ent->pw_dir);    SAFE_PUSH_TEXT(ent->pw_shell);    f_aggregate(7);   }   #endif      #if defined(HAVE_GETGRNAM) || defined(HAVE_GETGRGID) || defined(HAVE_GETGRENT)   void push_grent(struct group *ent)   {
pike.git/src/modules/system/passwords.c:248: Inside #if defined(HAVE_GETGRGID)
   *! @endarray    *!    *! @seealso    *! @[getgrent()]    *! @[getgrnam()]    */   void f_getgrgid(INT32 args)   {    INT_TYPE gid;    struct group *foo; -  get_all_args("getgrgid", args, "%i", &gid); +  get_all_args(NULL, args, "%i", &gid);       LOCK_IMUTEX(&password_protection_mutex);       THREADS_ALLOW_UID();    foo = getgrgid( gid );    THREADS_DISALLOW_UID();    pop_n_elems( args );    push_grent( foo );       UNLOCK_IMUTEX(&password_protection_mutex);
pike.git/src/modules/system/passwords.c:291: Inside #if defined(HAVE_GETGRNAM)
   *! @endarray    *!    *! @seealso    *! @[getgrent()]    *! @[getgrgid()]    */   void f_getgrnam(INT32 args)   {    char *str;    struct group *foo; -  get_all_args("getgrnam", args, "%s", &str); +  get_all_args(NULL, args, "%s", &str);       LOCK_IMUTEX(&password_protection_mutex);       THREADS_ALLOW_UID();    foo = getgrnam( str );    THREADS_DISALLOW_UID();    pop_n_elems( args );    push_grent( foo );       UNLOCK_IMUTEX(&password_protection_mutex);
pike.git/src/modules/system/passwords.c:341: Inside #if defined(HAVE_GETPWNAM)
   *!    *! @seealso    *! @[getpwuid()]    *! @[getpwent()]    */   void f_getpwnam(INT32 args)   {    char *str;    struct passwd *foo;    -  get_all_args("getpwnam", args, "%s", &str); +  get_all_args(NULL, args, "%s", &str);       LOCK_IMUTEX(&password_protection_mutex);       THREADS_ALLOW_UID();    foo = getpwnam(str);    THREADS_DISALLOW_UID();       pop_n_elems(args);    push_pwent(foo);   
pike.git/src/modules/system/passwords.c:392: Inside #if defined(HAVE_GETPWUID)
   *!    *! @seealso    *! @[getpwnam()]    *! @[getpwent()]    */   void f_getpwuid(INT32 args)   {    INT_TYPE uid;    struct passwd *foo;    -  get_all_args("getpwuid", args, "%i", &uid); +  get_all_args(NULL, args, "%i", &uid);       LOCK_IMUTEX(&password_protection_mutex);       THREADS_ALLOW_UID();    foo = getpwuid(uid);    THREADS_DISALLOW_UID();       pop_n_elems(args);    push_pwent(foo);   
pike.git/src/modules/system/passwords.c:755: Inside #if defined(HAVE_GETGRENT) and #if defined(HAVE_GETPWNAM)
   */   void f_get_groups_for_user(INT32 arg)   {    struct group *gr = NULL;    struct passwd *pw;    struct array *a;    char *user = NULL; /* Keep compiler happy */    ONERROR err;    int base_gid;    -  check_all_args("get_groups_for_user",arg,BIT_INT | BIT_STRING, 0); +  check_all_args(NULL,arg,BIT_INT | BIT_STRING, 0);    pop_n_elems(arg-1);    a=low_allocate_array(0,10);    if(TYPEOF(sp[-1]) == T_INT)    {    int uid=sp[-1].u.integer;       LOCK_IMUTEX(&password_protection_mutex);       THREADS_ALLOW_UID();    pw=getpwuid(uid);