blob: 79b5a23333943da6c18ceb6cced1ba98183882af (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
--- freenx-0.4.1/nxserver.orig Sat Jun 25 08:26:22 2005
+++ freenx-0.4.1/nxserver Tue Jun 28 09:38:25 2005
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Free implementation of nxserver components
#
@@ -27,7 +27,7 @@
# Reread boot command line; echo last parameter's argument or return false.
getparam(){
stringinstring "&$1=" "$CMDLINE" || return 1
-echo "$CMDLINE" | awk "/^$1=/"' { VAL=$2 } END { print VAL }' FS="=" RS="(&|\n)"
+echo "$CMDLINE" | tr "&" "\n" | egrep "^"$1"=" | awk -F= '{ VAL=$2 } END { print VAL }'
return 0
}
@@ -46,7 +46,7 @@
passdb_get_crypt_pass()
{
- echo "$@" | md5sum | cut -d" " -f1
+ echo "$@" | md5 | cut -d" " -f1
}
passdb_get_pass()
@@ -836,7 +836,7 @@
rm -f "$SESS_LOCKFILE"
- uniqueid=$(echo $[$RANDOM*$RANDOM] | md5sum | cut -d" " -f1 | tr "[a-z]" "[A-Z]")
+ uniqueid=$(echo $[$RANDOM*$RANDOM] | md5 | cut -d" " -f1 | tr "[a-z]" "[A-Z]")
FULL_PARAMS="user=$USER&userip=$USERIP&uniqueid=$uniqueid&display=$SESS_DISPLAY&$PARAMS"
log 6 "$FULL_PARAMS"
@@ -1091,7 +1091,7 @@
[ ${#CMD_CHUSER} -ge 32 ] && cmd_abort "Error: User $CMD_CHUSER must be shorter than 32 characters."
egrep -q "^$CMD_CHUSER:" $NX_ETC_DIR/passwords && cmd_abort "Error: User $CMD_CHUSER already in database."
- getent passwd | egrep -q "^$CMD_CHUSER:" || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
+ cat /etc/passwd | egrep -q "^$CMD_CHUSER:" || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
passdb_add_user "$CMD_CHUSER"
}
|