This file is indexed.

/usr/lib/rds/drivemap.vbs is in rdsserver 1.1.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
on error resume next

'Declare Variables
set network = CreateObject("WScript.Network")
set shell = CreateObject("WScript.Shell")
domainname = network.UserDomain
username = network.UserName
computername = network.ComputerName
set user = GetObject("WinNT://" & domainname & "/" & username)
redim groups(0)

For Each groupobj in user.Groups
        redim preserve groups(ubound(groups) + 1)
        groups(ubound(groups)) = groupobj.name
Next

Function getNextLetter()

	set drivelist = network.enumNetworkDrives()
	letters = "ZYXWVUTSRQPONMLKJIHGFE"

	For i = 1 To 22
		driveexists = false
		drive = Mid(letters,i,1) & ":"

		For j = 0 To drivelist.count() -1 Step 2
			If drivelist.item(j) = drive Then
				driveexists = true
			End If
		Next

		If driveexists = false Then
			getNextLetter = drive
			Exit Function
		End If
	Next

End Function

Function mapDrive(letter,path)

	If letter = "*:" or letter = "" Then
		mapDrive = network.MapNetworkDrive(getNextLetter,path)
	else
		mapDrive = network.MapNetworkDrive(letter,path)
	End If

End Function

Function mapIfUser(user,letter, path)

	If UCase(user) = UCase(username) Then
		mapDrive letter, path
	End If

End Function


Function mapIfComputer(computer,letter, path)

	If UCase(computer) = UCase(computername) Then
		mapDrive letter, path
	End If

End Function

Function mapIfMember(group, letter, path)

        For Each i in groups
                If UCase(i) = UCase(group) Then
                        mapDrive letter, path
                        Exit Function
                End If
        Next

End Function