[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r903 - GNUnet/src/conf
From: |
durner |
Subject: |
[GNUnet-SVN] r903 - GNUnet/src/conf |
Date: |
Sun, 12 Jun 2005 10:56:04 -0700 (PDT) |
Author: durner
Date: 2005-06-12 10:55:55 -0700 (Sun, 12 Jun 2005)
New Revision: 903
Modified:
GNUnet/src/conf/wizard.glade
GNUnet/src/conf/wizard_curs.c
GNUnet/src/conf/wizard_interface.c
GNUnet/src/conf/wizard_util.c
Log:
No service account for gnunetd by default
Modified: GNUnet/src/conf/wizard.glade
===================================================================
--- GNUnet/src/conf/wizard.glade 2005-06-12 14:28:55 UTC (rev 902)
+++ GNUnet/src/conf/wizard.glade 2005-06-12 17:55:55 UTC (rev 903)
@@ -2223,8 +2223,10 @@
<property name="text" translatable="yes">Define the user
and the group owning the GNUnet service here.
For security reasons, it is a good idea to let this setup create a new user
account and a new group under which the GNUnet service is started at system
startup.
-You can also specify existing ones.
-In any case, you should check its permissions to critical files on your
system.</property>
+
+However, GNUnet may not be able to access files other than its own. This
includes files you want to publish in GNUnet. You'll have to grant read
permissions to the user specified below.
+
+Leave the fields empty to run GNUnet with system privileges.</property>
</widget>
</child>
</widget>
@@ -2287,7 +2289,7 @@
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
- <property name="text">gnunet</property>
+ <property name="text"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
@@ -2308,7 +2310,7 @@
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
- <property name="text">gnunet</property>
+ <property name="text"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
Modified: GNUnet/src/conf/wizard_curs.c
===================================================================
--- GNUnet/src/conf/wizard_curs.c 2005-06-12 14:28:55 UTC (rev 902)
+++ GNUnet/src/conf/wizard_curs.c 2005-06-12 17:55:55 UTC (rev 903)
@@ -384,10 +384,11 @@
"For security reasons, it is a good
idea to let this setup create "
"a new user account under which the
GNUnet service is started "
"at system startup.\n\n"
- "You can also specify an already
existant user account here.\n\n"
- "In any case, you should check its
permissions to critical files "
- "on your system.\n\nGNUnet user:"),
- rows, cols - 5, "gnunet");
+ "However, GNUnet may not be able to
access files other than its own. "
+ "This includes files you want to
publish in GNUnet. You'll have to "
+ "grant read permissions to the user
specified below.\n\n"
+ "Leave the fields empty to run GNUnet
with system privileges.\n\n"
+ "GNUnet user:"), rows, cols - 5, "");
if (ret == 1) {
/* Help */
@@ -414,7 +415,7 @@
"Only members of this group
will be allowed to start and stop the "
"the GNUnet server and have
access to GNUnet server data.\n\n"
"GNUnet group:"),
- rows, cols - 5, "gnunet");
+ rows, cols - 5, "");
if (ret == 1) {
/* Help */
Modified: GNUnet/src/conf/wizard_interface.c
===================================================================
--- GNUnet/src/conf/wizard_interface.c 2005-06-12 14:28:55 UTC (rev 902)
+++ GNUnet/src/conf/wizard_interface.c 2005-06-12 17:55:55 UTC (rev 903)
@@ -1192,7 +1192,7 @@
gtk_text_buffer_set_text (gtk_text_view_get_buffer
(GTK_TEXT_VIEW (textview12)),
_
- ("Define the user and the group owning the GNUnet
service here.\n\nFor security reasons, it is a good idea to let this setup
create a new user account and a new group under which the GNUnet service is
started at system startup.\nYou can also specify existing ones.\nIn any case,
you should check its permissions to critical files on your system."),
+ ("Define the user and the group owning the GNUnet
service here.\n\nFor security reasons, it is a good idea to let this setup
create a new user account and a new group under which the GNUnet service is
started at system startup.\n\nHowever, GNUnet may not be able to access files
other than its own. This includes files you want to publish in GNUnet. You'll
have to grant read permissions to the user specified below.\n\nLeave the fields
empty to run GNUnet with system privileges."),
-1);
hseparator7 = gtk_hseparator_new ();
@@ -1219,14 +1219,12 @@
gtk_table_attach (GTK_TABLE (table3), entUser, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_entry_set_text (GTK_ENTRY (entUser), "gnunet");
entGroup = gtk_entry_new ();
gtk_widget_show (entGroup);
gtk_table_attach (GTK_TABLE (table3), entGroup, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_entry_set_text (GTK_ENTRY (entGroup), "gnunet");
label109 = gtk_label_new (_("User account:"));
gtk_widget_show (label109);
@@ -1310,10 +1308,6 @@
g_signal_connect ((gpointer) assi_step4, "destroy",
G_CALLBACK (on_assi_destroy), NULL);
- g_signal_connect ((gpointer) entUser, "changed",
- G_CALLBACK (on_entUser_changed), NULL);
- g_signal_connect ((gpointer) entGroup, "changed",
- G_CALLBACK (on_entGroup_changed), NULL);
g_signal_connect ((gpointer) step4_back, "clicked",
G_CALLBACK (on_step4_back_clicked), NULL);
g_signal_connect ((gpointer) step4_next, "clicked",
Modified: GNUnet/src/conf/wizard_util.c
===================================================================
--- GNUnet/src/conf/wizard_util.c 2005-06-12 14:28:55 UTC (rev 902)
+++ GNUnet/src/conf/wizard_util.c 2005-06-12 17:55:55 UTC (rev 903)
@@ -148,9 +148,13 @@
{
if (IsWinNT())
{
- char *err;
+ char *err = NULL;
DWORD dwErr;
+ if (username && !strlen(username))
+ username = NULL;
+
+ /* Install service */
switch(InstallAsService(username))
{
case 0:
@@ -172,7 +176,8 @@
GetLastError());
}
- if (!err || dwErr == ERROR_SERVICE_EXISTS)
+ /* Grant permissions to the GNUnet directory */
+ if ((!err || dwErr == ERROR_SERVICE_EXISTS) && username)
{
char szHome[_MAX_PATH + 1];
@@ -360,6 +365,10 @@
* @todo Check FreeBSD (adduser(8)), add support for useradd(8)
*/
int wiz_addServiceAccount(char *group_name, char *user_name) {
+
+ if (!user_name || !strlen(user_name))
+ return 1;
+
#ifdef WINDOWS
if (IsWinNT())
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r903 - GNUnet/src/conf,
durner <=