Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r4589 - in developers/zecke: . root-password
      ([EMAIL PROTECTED])
   2. r4590 - developers/zecke/root-password ([EMAIL PROTECTED])
   3. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.asu.stable'
      ([EMAIL PROTECTED])
   4. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.asu.dev'
      ([EMAIL PROTECTED])
   5. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.asu.stable'
      ([EMAIL PROTECTED])
   6. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.asu.dev'
      ([EMAIL PROTECTED])
   7. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.asu.stable'
      ([EMAIL PROTECTED])
   8. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.asu.dev'
      ([EMAIL PROTECTED])
   9. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.asu.dev'
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: zecke
Date: 2008-08-06 02:04:59 +0200 (Wed, 06 Aug 2008)
New Revision: 4589

Added:
   developers/zecke/root-password/
   developers/zecke/root-password/GNUmakefile
   developers/zecke/root-password/README
   developers/zecke/root-password/root-password.c
Log:
[root-password] First attempt at a small utility to set the root password
    Small Gtk+ app to set the root password. Not yet tested.


Added: developers/zecke/root-password/GNUmakefile
===================================================================
--- developers/zecke/root-password/GNUmakefile                          (rev 0)
+++ developers/zecke/root-password/GNUmakefile  2008-08-06 00:04:59 UTC (rev 
4589)
@@ -0,0 +1,4 @@
+all: root-password
+
+root-password: root-password.c
+       $(CC) -o root-password $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `pkg-config 
--cflags --libs gtk+-2.0` -lcrypt root-password.c

Added: developers/zecke/root-password/README
===================================================================
--- developers/zecke/root-password/README                               (rev 0)
+++ developers/zecke/root-password/README       2008-08-06 00:04:59 UTC (rev 
4589)
@@ -0,0 +1,4 @@
+Small application to set the root password.
+
+The code was taken from opie-login which was inspired by GPE's ownerinfo
+and gpe-dm utility.

Added: developers/zecke/root-password/root-password.c
===================================================================
--- developers/zecke/root-password/root-password.c                              
(rev 0)
+++ developers/zecke/root-password/root-password.c      2008-08-06 00:04:59 UTC 
(rev 4589)
@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2008 Holger Hans Peter Freyther <[EMAIL PROTECTED]>
+ * Copyrgith (C) 2008 Openmoko Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <pwd.h>
+#include <shadow.h>
+#include <stdio.h>
+#include <time.h>
+
+#define _XOPEN_SOURCE
+#include <unistd.h>
+
+#include <gtk/gtk.h>
+
+// This function is taken from 'busybox'.
+static int i64c(int i) {
+    if (i <= 0)
+        return ('.');
+    if (i == 1)
+        return ('/');
+    if (i >= 2 && i < 12)
+        return ('0' - 2 + i);
+    if (i >= 12 && i < 38)
+        return ('A' - 12 + i);
+    if (i >= 38 && i < 63)
+        return ('a' - 38 + i);
+    return ('z');
+}   
+    
+// This function is taken from 'busybox'.
+static const char *crypt_make_salt() {
+    time_t now;
+    static unsigned long x;
+    static char result[3];
+    
+    time(&now);
+    x += now + getpid() + clock();
+    result[0] = i64c(((x >> 18) ^ (x >> 6)) & 077);
+    result[1] = i64c(((x >> 12) ^ x) & 077);
+    result[2] = '\0';
+    return result;
+}
+
+#define CRYPT_FAILED        -1
+#define NEW_FILE_FAILED     -2
+#define RENAME_FAILED       -3
+
+static int write_password(const char* password_input)
+{
+   char* password = crypt(password_input, crypt_make_salt());
+
+    if (!password)
+        return CRYPT_FAILED; 
+
+    /* rewind and rewrite the password file */
+    setpwent();
+
+    FILE* file = fopen("/etc/passwd.new", "w");
+    if (!file)
+        return NEW_FILE_FAILED;
+
+    struct passwd* pass;
+    while ((pass = getpwent()) != 0l) {
+        /* no  shadow password support */
+        if (pass->pw_uid == 0)
+            pass->pw_passwd = password;
+
+        putpwent(pass, file);
+    }
+
+    fclose( file );
+    endpwent();
+    if (rename("/etc/passwd.new","/etc/passwd") == -1)
+        return RENAME_FAILED;
+
+    return 0;
+}
+
+// TODO use bindtext...gettext
+#define _(x) (x)
+
+GtkWidget* s_password;
+GtkWidget* s_confirm;
+GtkWidget* s_window;
+
+static void run_message(const char* message, gboolean clear)
+{
+    if (clear) {
+        gtk_entry_set_text (GTK_ENTRY(s_password), "");
+        gtk_entry_set_text (GTK_ENTRY(s_confirm), "");
+    }
+
+    /* show the message */
+    GtkWidget* dialog = gtk_message_dialog_new (GTK_WINDOW(s_window),
+                                  GTK_DIALOG_DESTROY_WITH_PARENT,
+                                  GTK_MESSAGE_ERROR,
+                                  GTK_BUTTONS_OK,
+                                  message);
+    gtk_dialog_run (GTK_DIALOG (dialog));
+    gtk_widget_destroy (dialog);
+}
+
+static void set_password()
+{
+    const char* password = gtk_entry_get_text (GTK_ENTRY(s_password));
+    const char* confirm  = gtk_entry_get_text (GTK_ENTRY(s_confirm));
+
+    if (strcmp(password, confirm) != 0)
+        return run_message (_("The passwords do not match. Please try 
again."), TRUE);
+
+    int result = write_password (password);
+    if (result == CRYPT_FAILED)
+        return run_message (_("The crypting of the password failed. Please try 
again."), FALSE);
+    else if (result == RENAME_FAILED || result == NEW_FILE_FAILED)
+        return run_message (_("The writing of the new password file failed. 
Check permissions and please try again."), FALSE);
+    else
+        return gtk_main_quit();
+}
+
+
+int main(int argc, char** argv)
+{
+    gtk_init(&argc, &argv);
+
+    /* Create the UI */
+    s_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+    g_signal_connect (s_window, "delete-event", G_CALLBACK(gtk_main_quit), 
NULL); 
+    gtk_window_set_title(GTK_WINDOW(s_window), _("Set root password"));
+
+    GtkWidget* intro = gtk_label_new (_("Please set a root password."));
+
+    GtkWidget* password_label = gtk_label_new (_("Password:"));
+    s_password = gtk_entry_new ();
+    gtk_entry_set_visibility (GTK_ENTRY(s_password), FALSE);
+
+    GtkWidget* confirm_label = gtk_label_new (_("Confirm:"));
+    gtk_misc_set_alignment (GTK_MISC(intro), 0, 0);
+    s_confirm = gtk_entry_new ();
+    gtk_entry_set_visibility (GTK_ENTRY(s_confirm), FALSE);
+
+    GtkWidget* button = gtk_button_new_with_label ("Set password");
+    g_signal_connect(button, "clicked", G_CALLBACK(set_password), NULL);
+
+    /* box packing */
+    GtkWidget* main_box = gtk_vbox_new (FALSE, 0);
+
+    GtkWidget* intro_box = gtk_hbox_new (FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(intro_box), intro, TRUE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(main_box), intro_box, FALSE, FALSE, 0);
+
+    GtkWidget* pass_box = gtk_hbox_new (FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(pass_box), password_label, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(pass_box), s_password, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX(main_box), pass_box, FALSE, FALSE, 0);
+
+    GtkWidget* confirm_box = gtk_hbox_new (FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(confirm_box), confirm_label, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(confirm_box), s_confirm, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX(main_box), confirm_box, FALSE, FALSE, 0);
+
+    GtkWidget* button_box = gtk_hbox_new (FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(button_box), button, TRUE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(main_box), button_box, FALSE, FALSE, 0); 
+
+    gtk_container_add (GTK_CONTAINER(s_window), main_box);
+    gtk_widget_show_all (GTK_WIDGET(s_window));
+    gtk_main();
+
+    return 0;
+}


Property changes on: developers/zecke/root-password/root-password.c
___________________________________________________________________
Name: svn:eol-style
   + native




--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2008-08-06 02:16:19 +0200 (Wed, 06 Aug 2008)
New Revision: 4590

Modified:
   developers/zecke/root-password/root-password.c
Log:
[root-password] Put the label + entry into a table and everything aligns nicely
    Make the alignment of the two rows look sane.


Modified: developers/zecke/root-password/root-password.c
===================================================================
--- developers/zecke/root-password/root-password.c      2008-08-06 00:04:59 UTC 
(rev 4589)
+++ developers/zecke/root-password/root-password.c      2008-08-06 00:16:19 UTC 
(rev 4590)
@@ -163,16 +163,13 @@
     gtk_box_pack_start (GTK_BOX(intro_box), intro, TRUE, FALSE, 0);
     gtk_box_pack_start (GTK_BOX(main_box), intro_box, FALSE, FALSE, 0);
 
-    GtkWidget* pass_box = gtk_hbox_new (FALSE, 0);
-    gtk_box_pack_start (GTK_BOX(pass_box), password_label, FALSE, FALSE, 0);
-    gtk_box_pack_start (GTK_BOX(pass_box), s_password, TRUE, TRUE, 0);
-    gtk_box_pack_start (GTK_BOX(main_box), pass_box, FALSE, FALSE, 0);
+    GtkWidget* entry_table = gtk_table_new (2, 2, FALSE);
+    gtk_table_attach (GTK_TABLE(entry_table), password_label, 0, 1, 0, 1, 
GTK_SHRINK, GTK_SHRINK, 0, 0);
+    gtk_table_attach_defaults (GTK_TABLE(entry_table), s_password,     1, 2, 
0, 1);
+    gtk_table_attach (GTK_TABLE(entry_table), confirm_label,  0, 1, 1, 2, 
GTK_SHRINK, GTK_SHRINK, 0, 0);
+    gtk_table_attach_defaults (GTK_TABLE(entry_table), s_confirm,      1, 2, 
1, 2);
+    gtk_box_pack_start (GTK_BOX(main_box), entry_table, FALSE, FALSE, 0);
 
-    GtkWidget* confirm_box = gtk_hbox_new (FALSE, 0);
-    gtk_box_pack_start (GTK_BOX(confirm_box), confirm_label, FALSE, FALSE, 0);
-    gtk_box_pack_start (GTK_BOX(confirm_box), s_confirm, TRUE, TRUE, 0);
-    gtk_box_pack_start (GTK_BOX(main_box), confirm_box, FALSE, FALSE, 0);
-
     GtkWidget* button_box = gtk_hbox_new (FALSE, 0);
     gtk_box_pack_start (GTK_BOX(button_box), button, TRUE, FALSE, 0);
     gtk_box_pack_start (GTK_BOX(main_box), button_box, FALSE, FALSE, 0); 




--- End Message ---
--- Begin Message ---
 conf/distro/include/sane-srcrevs.inc               |    1 +
 packages/openmoko-tools/app-restarter_svn.bb       |    1 +
 .../openmoko-tools/openmoko-set-root-password.bb   |   25 ++++++++++++++++++++
 packages/tasks/task-openmoko-asu.bb                |    3 +-
 packages/tasks/task-openmoko-feed.bb               |    4 ++-
 5 files changed, 32 insertions(+), 2 deletions(-)

New commits:
commit a3b8a40fc84291d93b22ab04b516473205c58a24
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 02:46:01 2008 +0200

    [openmoko] Add the matchbox-keyboard-im gtk+ modules for keyboard input
        Make the automatic keyboard work for Gtk+ applications. e-wm/illume does
        honor the matchbox keyboard requests and this gtk+ module is sending 
them.

commit 79e463566fb89d75bec09042876672422eb49473
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 02:40:21 2008 +0200

    [task-openmoko] Add the Qtopia debug helper and root password utility

commit 5c03d90c4741b8fbdcc8766d84c8a8215968e637
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 02:38:34 2008 +0200

    [openmoko] Add a Gtk+ utility to set the root password
        This utility will be installable through the feed.

commit de2ae6fb54734682f1b01b860cb4056b7e2fdb4b
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 02:29:49 2008 +0200

    [app-restarter] Add X11 to the dependencies.




--- End Message ---
--- Begin Message ---
 conf/distro/include/sane-srcrevs.inc               |    3 +-
 packages/openmoko-tools/app-restarter_svn.bb       |    1 +
 .../openmoko-tools/openmoko-set-root-password.bb   |   25 ++++++++++++++++++++
 packages/tasks/task-openmoko-asu.bb                |    3 +-
 packages/tasks/task-openmoko-feed.bb               |    4 ++-
 5 files changed, 33 insertions(+), 3 deletions(-)

New commits:
commit 5252d7977370cb81333988db35eda916dc07f53a
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 02:46:01 2008 +0200

    [openmoko] Add the matchbox-keyboard-im gtk+ modules for keyboard input
        Make the automatic keyboard work for Gtk+ applications. e-wm/illume does
        honor the matchbox keyboard requests and this gtk+ module is sending 
them.

commit e6ac61df5e71f2c8be94998bb61f092003e891fb
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 02:40:21 2008 +0200

    [task-openmoko] Add the Qtopia debug helper and root password utility

commit ad6f7e8de52f4065fb056b5d15fe6e9cf1994b97
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 02:38:34 2008 +0200

    [openmoko] Add a Gtk+ utility to set the root password
        This utility will be installable through the feed.

commit ed930c7c71028a978dfdd1e159bad341d9569f14
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 02:29:49 2008 +0200

    [app-restarter] Add X11 to the dependencies.

commit c40dda990d397eda2784f2d9f0f6484b8637a755
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 00:58:32 2008 +0200

    [srcrev] Upgrade assassin to avoid packagekitd races
        Make search group/update in a queue. That avoid some racing condition
        on packagekitd.




--- End Message ---
--- Begin Message ---
 conf/distro/include/sane-srcrevs.inc           |    4 ++--
 conf/machine/om-gta01.conf                     |    2 +-
 conf/machine/om-gta02.conf                     |    9 ++-------
 packages/openmoko-projects/illume-theme_svn.bb |   22 +++++++++++++++++++---
 packages/tasks/task-base.bb                    |    2 +-
 5 files changed, 25 insertions(+), 14 deletions(-)

New commits:
commit 756e8456575997eaffe8be7e72567a3fe7547fbb
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Sun Aug 3 19:55:49 2008 +0200

    [illume] Allow people to easily replace the illume edje files
        Now people can set a different E_PROFILE and replace the
        illume.edj and illume_init.edj file. This should enable people
        to play with that.

commit 5222611464b0a5c5e16da024bd78f24fff661eb4
Author: Carsten Haitzler <[EMAIL PROTECTED]>
Date:   Tue Aug 5 18:56:51 2008 +1000

    update ompower - cleaner suspend/resume

commit 56f94e4bda2f9706db063dccbcf1d75c0875529f
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 00:49:25 2008 +0200

    [om-gta02] Do not generate yaffs2 due size issues
        openmoko-asu-image fails with yaffs2 due size constraints. As we do not 
have a
        yaffs2 enabled kernel remove the gernation of yaffs2 images. It can be 
easily
        added back.

commit d2313296c004b2faaf2d4b37b17bbf0091f4e501
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Tue Aug 5 22:56:51 2008 +0200

    [srcrev] Stable kernel upgrade. g-ether is now a module, beware
        You will need to have the g-ether module loaded for usb ethernet now

commit 170723a08d3af2b8427a3c6916f61cc8d7a262ed
Author: Graeme Gregory <[EMAIL PROTECTED]>
Date:   Mon Aug 4 15:50:49 2008 +0100

    [task-base] increment PR after modules changes

commit 918dc2dd0c06863a7a5302880e6c920b240db680
Author: Graeme Gregory <[EMAIL PROTECTED]>
Date:   Mon Aug 4 15:50:17 2008 +0100

    [om-gta02] we have large flash so load all modules

commit 8b285a1e845a602e5996a1894bffcd11e3124d33
Author: Graeme Gregory <[EMAIL PROTECTED]>
Date:   Mon Aug 4 15:49:33 2008 +0100

    [om-gta01] make sure g-ether is in image




--- End Message ---
--- Begin Message ---
 packages/tasks/task-openmoko-asu-feed.bb |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

New commits:
commit 15aa8bf72252e389fd05341d224c65d274f04a7b
Author: Julian_chu <[EMAIL PROTECTED]>
Date:   Wed Aug 6 15:45:10 2008 +0800

    [openmoko-asu-feed] Remove minimo from ASU-feed




--- End Message ---
--- Begin Message ---
 packages/tasks/task-openmoko-asu-feed.bb |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

New commits:
commit 53e2256f8b9d4f9ec95b23d561b07ed96c8118b3
Author: Julian_chu <[EMAIL PROTECTED]>
Date:   Wed Aug 6 15:45:10 2008 +0800

    [openmoko-asu-feed] Remove minimo from ASU-feed




--- End Message ---
--- Begin Message ---
 classes/update-rc.d.bbclass  |    8 +++++---
 packages/dbus/dbus_1.1.20.bb |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 4a08a09fe19a63b9035e534497c577f1e61f4126
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Wed Aug 6 09:52:36 2008 +0200

    [dbus] Bump the PR after the update-rc change as we know dbus benefits from 
it

commit 84656519be62aec9280cf65ac4b4b8273eac6f37
Author: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date:   Tue Jul 29 13:36:42 2008 +0000

    make sure update-rc is always executed in an offline postinst (from poky 
r4976)
    (Note: This fixes (among other things) dbus not being started on first boot)




--- End Message ---
--- Begin Message ---
 conf/distro/include/sane-srcdates.inc |    2 +-
 conf/distro/include/sane-srcrevs.inc  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit feb87d2587ad5a85cb05e7de54e9fbd95c488757
Author: Carsten Haitzler <[EMAIL PROTECTED]>
Date:   Wed Aug 6 18:28:44 2008 +1000

    update efl and illume to have config for removed spanner , asterisk moved,
    and cleaner suspend.




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to