Ignore:
Timestamp:
May 24, 2009, 7:55:48 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 branch to 3.3.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c

    r206 r224  
    7979        uint32_t stored_num_ous;
    8080        char *target_hostname;
     81        uid_t uid;
    8182} join_state;
    8283
     
    14411442                entry = gtk_entry_new();
    14421443                gtk_entry_set_max_length(GTK_ENTRY(entry), 256);
     1444
     1445                if (state->uid != 0) {
     1446                        gtk_widget_set_sensitive(GTK_WIDGET(entry), FALSE);
     1447                }
    14431448                g_signal_connect(G_OBJECT(entry), "changed",
    14441449                                 G_CALLBACK(callback_enter_computer_description_and_unlock),
     
    15271532                         (gpointer)state);
    15281533        gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0);
     1534        if (state->uid != 0) {
     1535                gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
     1536        }
    15291537        gtk_widget_show(button);
    15301538
     
    15341542        gtk_misc_set_alignment(GTK_MISC(state->label_reboot), 0, 0);
    15351543        gtk_box_pack_start(GTK_BOX(vbox), state->label_reboot, TRUE, TRUE, 0);
     1544        if (state->uid != 0) {
     1545                gtk_label_set_text(GTK_LABEL(state->label_reboot),
     1546                           "You cannot change computer description as you're not running with root permissions");
     1547        }
     1548
    15361549        gtk_widget_show(state->label_reboot);
    15371550
     
    17641777        }
    17651778
     1779        state->uid = geteuid();
     1780
    17661781        state->ctx = ctx;
    17671782
Note: See TracChangeset for help on using the changeset viewer.