[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] server - Only check for $HOME/.speech-dispatcher if the current
From: |
Luke Yelavich |
Subject: |
[PATCH] server - Only check for $HOME/.speech-dispatcher if the current user's home directory starts with /home |
Date: |
Fri, 28 Aug 2009 17:43:36 +1000 |
From: Luke Yelavich <address@hidden>
To: address@hidden
If the current user's home directory does not start with /home, then it is
safe to assume that speech-dispatcher is being run as root, or another system
user, and therefore should place its pid file in /var/run somewhere, and use
/etc/speech-dispatcher for configuration.
---
src/server/speechd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/server/speechd.c b/src/server/speechd.c
index a9ed391..a64820d 100644
--- a/src/server/speechd.c
+++ b/src/server/speechd.c
@@ -784,7 +784,7 @@ main(int argc, char *argv[])
/* Check if there is .speech-dispatcher directory
in user's home directory. If yes, put everything
here */
- {
+ if (strncmp("/home", g_get_home_dir(), 5) == 0){
char *home_dir;
GDir *testing;
home_dir = (char*) g_get_home_dir();
--
1.6.3.3
- [PATCH] server - Only check for $HOME/.speech-dispatcher if the current user's home directory starts with /home,
Luke Yelavich <=