~bratsche/gdm/gdm-greeter-gtkrc

« back to all changes in this revision

Viewing changes to daemon/verify-shadow.c

  • Committer: Bazaar Package Importer
  • Date: 2008-11-05 23:50:46 UTC
  • Revision ID: jamesw@ubuntu.com-20081105235046-a1f87qv0x87kkdok
Tags: upstream-ubuntu-2.19.4
ImportĀ upstreamĀ versionĀ 2.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
/**
88
88
 * gdm_verify_user:
89
89
 * @username: Name of user or NULL if we should ask
90
 
 * @display: Name of display to register with the authentication system
91
 
 * @local: boolean if local
92
90
 * @allow_retry: boolean.  Not used by verify-crypt.  If this code
93
91
 *               allowed the user to retry, this boolean would specify
94
92
 *               whether to enable this feature.  We only want this
104
102
gchar *
105
103
gdm_verify_user (GdmDisplay *d,
106
104
                 const char *username,
107
 
                 const gchar *display,
108
 
                 gboolean local,
109
105
                 gboolean allow_retry)
110
106
{
111
107
        gchar *login, *passwd, *ppasswd;
120
116
        gint reEnter, ret;
121
117
#endif
122
118
 
123
 
        if (local && d->timed_login_ok)
 
119
        if (d->attached && d->timed_login_ok)
124
120
                gdm_slave_greeter_ctl_no_ret (GDM_STARTTIMER, "");
125
121
 
126
122
        if (username == NULL) {
138
134
                                selected_user = NULL;
139
135
                        } else {
140
136
                                /* some other interruption */
141
 
                                if (local)
 
137
                                if (d->attached)
142
138
                                        gdm_slave_greeter_ctl_no_ret (GDM_STOPTIMER, "");
143
139
                                g_free (login);
144
140
                                return NULL;
189
185
                if (passwd == NULL)
190
186
                        passwd = g_strdup ("");
191
187
                if (gdm_slave_greeter_check_interruption ()) {
192
 
                        if (local)
 
188
                        if (d->attached)
193
189
                                gdm_slave_greeter_ctl_no_ret (GDM_STOPTIMER, "");
194
190
                        g_free (login);
195
191
                        g_free (passwd);
198
194
                }
199
195
        }
200
196
 
201
 
        if (local)
 
197
        if (d->attached)
202
198
                gdm_slave_greeter_ctl_no_ret (GDM_STOPTIMER, "");
203
199
 
204
200
        if (pwent == NULL) {
227
223
                return NULL;
228
224
        }
229
225
 
230
 
        if ( ( ! gdm_daemon_config_get_value_bool (GDM_KEY_ALLOW_ROOT)||
231
 
               ( ! gdm_daemon_config_get_value_bool (GDM_KEY_ALLOW_REMOTE_ROOT) && ! local) ) &&
232
 
             pwent->pw_uid == 0) {
233
 
                g_warning (_("Root login disallowed on display '%s'"), display);
 
226
        if (( ! gdm_daemon_config_get_value_bool (GDM_KEY_ALLOW_ROOT) ||
 
227
            ( ! gdm_daemon_config_get_value_bool (GDM_KEY_ALLOW_REMOTE_ROOT) &&
 
228
              ! d->attached)) && pwent->pw_uid == 0) {
 
229
 
 
230
                g_warning (_("Root login disallowed on display '%s'"), d->name);
234
231
                gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX,
235
232
                                              _("The system administrator "
236
233
                                                "is not allowed to login "
414
411
/**
415
412
 * gdm_verify_setup_user:
416
413
 * @login: The name of the user
417
 
 * @display: The name of the display
418
414
 *
419
415
 * This is used for auto loging in.  This just sets up the login
420
416
 * session for this user
423
419
gboolean
424
420
gdm_verify_setup_user (GdmDisplay *d,
425
421
                       const gchar *login,
426
 
                       const gchar *display,
427
422
                       char **new_login)
428
423
{
429
424
        struct passwd *pwent;