Imported Upstream version 2.1.19
[platform/upstream/gpg2.git] / common / session-env.c
index 8f78c10..c1eb1d9 100644 (file)
@@ -24,7 +24,7 @@
  * 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/>.
+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #include <config.h>
@@ -56,7 +56,7 @@ struct session_environment_s
 };
 
 
-/* A list of environment vribales we pass from the actual user
+/* A list of environment variables we pass from the actual user
   (e.g. gpgme) down to the pinentry.  We do not handle the locale
   settings because they do not only depend on envvars.  */
 static struct
@@ -72,8 +72,12 @@ static struct
                                       modules (eg "@im=SCIM").  */
   { "GTK_IM_MODULE" },           /* Used by gtk to select gtk input
                                     modules (eg "scim-bridge").  */
+  { "DBUS_SESSION_BUS_ADDRESS" },/* Used by GNOME3 to talk to gcr over
+                                    dbus */
   { "QT_IM_MODULE" },            /* Used by Qt to select qt input
                                       modules (eg "xim").  */
+  { "INSIDE_EMACS" },            /* Set by Emacs before running a
+                                    process.  */
   { "PINENTRY_USER_DATA", "pinentry-user-data"}
                                  /* Used for communication with
                                     non-standard Pinentries.  */
@@ -93,7 +97,7 @@ static size_t lastallocatedarraysize;
 
 /* Return the names of standard environment variables one after the
    other.  The caller needs to set the value at the address of
-   ITERATOR initally to 0 and then call this function until it returns
+   ITERATOR initially to 0 and then call this function until it returns
    NULL.  */
 const char *
 session_env_list_stdenvnames (int *iterator, const char **r_assname)
@@ -313,7 +317,7 @@ session_env_getenv (session_env_t se, const char *name)
    long it has not been removed or updated by a call to
    session_env_putenv.  If the variable does not exist, the function
    tries to return the value trough a call to getenv; if that returns
-   a value, this value is recorded and and used.  If no value could be
+   a value, this value is recorded and used.  If no value could be
    found, returns NULL.  The caller must not change the returned
    value. */
 char *
@@ -368,7 +372,7 @@ session_env_getenv_or_default (session_env_t se, const char *name,
 
 /* List the entire environment stored in SE.  The caller initially
    needs to set the value of ITERATOR to 0 and then call this function
-   until it returns NULL.  The value is retruned at R_VALUE.  If
+   until it returns NULL.  The value is returned at R_VALUE.  If
    R_DEFAULT is not NULL, the default flag is stored on return.  The
    default flag indicates that the value has been taken from the
    process' environment.  The caller must not change the returned