[GRASS-SVN] r58824 - grass/branches/releasebranch_6_4/db/db.login

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 1 08:15:32 PST 2014


Author: neteler
Date: 2014-02-01 08:15:32 -0800 (Sat, 01 Feb 2014)
New Revision: 58824

Modified:
   grass/branches/releasebranch_6_4/db/db.login/description.html
   grass/branches/releasebranch_6_4/db/db.login/main.c
Log:
db.login: partial backport of trunk r58820

Modified: grass/branches/releasebranch_6_4/db/db.login/description.html
===================================================================
--- grass/branches/releasebranch_6_4/db/db.login/description.html	2014-02-01 16:02:26 UTC (rev 58823)
+++ grass/branches/releasebranch_6_4/db/db.login/description.html	2014-02-01 16:15:32 UTC (rev 58824)
@@ -1,36 +1,40 @@
 <h2>DESCRIPTION</h2>
 
-<em>db.login</em> sets user/password for driver/database.
+<em>db.login</em> sets the user name and optionally also a password for
+the connection to the selected <b>database</b> through the DB <b>driver</b>.
 
 <h2>NOTE</h2>
 
-This is only related to SQL database backends (PostgreSQL, MySQL etc).
-The passwords are stored in a hidden file in the user account ('home' 
-directory) called <em>.grasslogin6</em>. Only the file owner
-can access this file.
+This is only related to SQL database backends
+like <a href="grass-pg.html">PostgreSQL</a>, <a href="grass-mysql.html">MySQL</a>
+or <a href="grass-odbc.html">ODBC</a>. The passwords are stored in a
+hidden unencrypted file in the user account ('home' directory)
+called <em>.grasslogin64</em>. Only the file owner can access this
+file.
 
 <h2>EXAMPLES</h2>
 
-Example 1: Username specified, password will be invisibly queried interactively:
+Only username specified (password will be interactively queried
+to remain invisible):
 
 <div class="code"><pre>
 db.login user=bacava
 </pre></div>
 
 <p>
-Example 2: Username and password specified (note that the command
+Username and password specified (note that the command
 lines history will store the password in this way):
 
 <div class="code"><pre>
-db.login user=bacava pass=secret
+db.login user=bacava password=secret
 </pre></div>
 
 <p>
-Example 3: Username and empty password specified (note that the command
+Username and empty password specified (note that the command
 lines history will store the password in this way):
 
 <div class="code"><pre>
-db.login user=bacava pass=""
+db.login user=bacava password=""
 </pre></div>
 
 <h2>SEE ALSO</h2>
@@ -39,8 +43,12 @@
 <a href="db.test.html">db.test</a>
 </em>
 
+<p>
+<a href="sql.html">SQL support in GRASS GIS</a>
+
 <h2>AUTHOR</h2>
 
 Radim Blazek
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>

Modified: grass/branches/releasebranch_6_4/db/db.login/main.c
===================================================================
--- grass/branches/releasebranch_6_4/db/db.login/main.c	2014-02-01 16:02:26 UTC (rev 58823)
+++ grass/branches/releasebranch_6_4/db/db.login/main.c	2014-02-01 16:15:32 UTC (rev 58824)
@@ -3,13 +3,14 @@
  *
  * MODULE:       db.login
  * AUTHOR(S):    Radim Blazek <radim.blazek gmail.com> (original contributor)
- *               Glynn Clements <glynn gclements.plus.com>, Markus Neteler <neteler itc.it>
- * PURPOSE:      
- * COPYRIGHT:    (C) 2004-2006 by the GRASS Development Team
+ *               Glynn Clements <glynn gclements.plus.com>
+ *               Markus Neteler <neteler itc.it>
+ * PURPOSE:      Store db login settings
+ * COPYRIGHT:    (C) 2004-2014 by the GRASS Development Team
  *
- *               This program is free software under the GNU General Public
- *               License (>=v2). Read the file COPYING that comes with GRASS
- *               for details.
+ *               This program is free software under the GNU General
+ *               Public License (>=v2). Read the file COPYING that
+ *               comes with GRASS for details.
  *
  *****************************************************************************/
 #include <stdio.h>
@@ -58,6 +59,7 @@
     user->required = NO;
     user->multiple = NO;
     user->description = _("Username");
+    user->guisection = _("Settings");
 
     password = G_define_option();
     password->key = "password";
@@ -65,6 +67,7 @@
     password->required = NO;
     password->multiple = NO;
     password->description = _("Password");
+    password->guisection = _("Settings");
 
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
@@ -107,7 +110,8 @@
     }
 
     if (password->answer)
-	G_warning(_("The password was stored in file"));
-
+        /* defined in lib/db/dbmi_base/login.c */
+        G_important_message(_("The password was stored in file (%s/.grasslogin64)"), G_home());
+    
     exit(EXIT_SUCCESS);
 }



More information about the grass-commit mailing list