~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2009-05-18 13:26:04 UTC
  • mfrom: (0.28.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090518132604-ebyuqimgymtr3h0k
Tags: 2:3.3.4-2ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/patches/VERSION.patch:
    - setup SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted (LP: #312449)
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control:
    - Make libwbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb.
    - Add suggests keyutils for smbfs. (LP: #300221)
  + debian/rules:
    - enable "native" PIE hardening.
    - remove --with-ctdb and --with-cluster-support=yes
  + Add ufw integration:
    - Created debian/samba.ufw profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install 
      profile
    - debian/control: have samba sugguest ufw.
* Dropped patches:
  + debian/patches/fix-upstream-bug-6186.patch: Merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        gboolean hostname_changed;
79
79
        uint32_t stored_num_ous;
80
80
        char *target_hostname;
 
81
        uid_t uid;
81
82
} join_state;
82
83
 
83
84
static void debug(const char *format, ...)
1440
1441
                /* Entry */
1441
1442
                entry = gtk_entry_new();
1442
1443
                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
                }
1443
1448
                g_signal_connect(G_OBJECT(entry), "changed",
1444
1449
                                 G_CALLBACK(callback_enter_computer_description_and_unlock),
1445
1450
                                 state);
1526
1531
                         G_CALLBACK(callback_do_change),
1527
1532
                         (gpointer)state);
1528
1533
        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
        }
1529
1537
        gtk_widget_show(button);
1530
1538
 
1531
1539
        /* Label (hidden) */
1533
1541
        gtk_label_set_line_wrap(GTK_LABEL(state->label_reboot), TRUE);
1534
1542
        gtk_misc_set_alignment(GTK_MISC(state->label_reboot), 0, 0);
1535
1543
        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
 
1536
1549
        gtk_widget_show(state->label_reboot);
1537
1550
 
1538
1551
#if 0
1763
1776
                return -1;
1764
1777
        }
1765
1778
 
 
1779
        state->uid = geteuid();
 
1780
 
1766
1781
        state->ctx = ctx;
1767
1782
 
1768
1783
        return 0;