summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------common0
-rw-r--r--gst-plugin/ChangeLog6
-rwxr-xr-xgst-plugin/tools/make_element8
3 files changed, 13 insertions, 1 deletions
diff --git a/common b/common
-Subproject 46ec7dfc1c09ff550ed6b7a4e0d3f2b2ac7d3ee
+Subproject e79879859bc866545379eb77e1378a906dc30eb
diff --git a/gst-plugin/ChangeLog b/gst-plugin/ChangeLog
index 9667c46..171a248 100644
--- a/gst-plugin/ChangeLog
+++ b/gst-plugin/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-26 Stefan Kost <ensonic@users.sf.net>
+
+ * tools/make_element:
+ Fix username detection. tries getent first and falls back to grep
+ passwd. Spotted by Karoly Segesdi.
+
2008-06-09 Jan Schmidt <jan.schmidt@sun.com>
* src/gstplugin.c:
diff --git a/gst-plugin/tools/make_element b/gst-plugin/tools/make_element
index 5d59ffc..6b2c07c 100755
--- a/gst-plugin/tools/make_element
+++ b/gst-plugin/tools/make_element
@@ -26,7 +26,13 @@ Template=$(echo $Template | tr -d _)
YEAR=`date "+%Y"`
if [ -z "$REAL_NAME" ]; then
- REAL_NAME=`grep `id -u` /etc/passwd | awk -F":" '{ print $5 }' | awk -F"," '{ print $1 }'`
+ user=`id -u`
+ if [ `which 2>/dev/null getent` ]; then
+ entry=`getent passwd $user`
+ else
+ entry=`grep $user /etc/passwd`
+ fi
+ REAL_NAME=`echo $entry | awk -F":" '{ print $5 }' | awk -F"," '{ print $1 }'`
fi
if [ -z "$EMAIL_ADDRESS" ]; then
EMAIL_ADDRESS="<user@hostname.org>"