~ubuntu-branches/ubuntu/feisty/gdm/feisty

« back to all changes in this revision

Viewing changes to gui/gdmuser.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-12-19 11:47:26 UTC
  • mfrom: (1.4.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061219114726-isciqcsd4pkxtgx6
Tags: 2.17.4-0ubuntu1
* New upstream release:
  - Improvements to gdmsetup, which now supports many new features.
  - No longer set XDG_SESSION_COOKIE if there is no cookie.
  - Now the key and dwell gestures start Orca instead of Gnopernicus.  
    Must use Orca v2.17.4 or later to work with GDM.
  - Translation updates
* debian/patches/90_fix_format_overflow.patch:
  - dropped, included in release.
* debian/patches/16_configure_menu_item.patch:
  - updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
    return (NULL != getpwnam (username));
290
290
}
291
291
 
 
292
gint
 
293
gdm_user_uid (const char *username)
 
294
{
 
295
    struct passwd *pwent;
 
296
    pwent = getpwnam (username);
 
297
    if (pwent != NULL)
 
298
            return pwent->pw_uid;
 
299
 
 
300
    return -1;
 
301
}
 
302
 
 
303
const char *
 
304
get_root_user (void)
 
305
{
 
306
        static char *root_user = NULL;
 
307
        struct passwd *pwent;
 
308
        
 
309
        if (root_user != NULL)
 
310
                return root_user;
 
311
        
 
312
        pwent = getpwuid (0);
 
313
        if (pwent == NULL) /* huh? */
 
314
                root_user = g_strdup ("root");
 
315
        else
 
316
                root_user = g_strdup (pwent->pw_name);
 
317
        return root_user;
 
318
}
 
319
 
292
320
void 
293
321
gdm_users_init (GList **users,
294
322
                GList **users_string,