File builders/alsa-lib-1.2.8/builder.sh changed (mode: 100644) (index bf78da9..d05618c) |
... |
... |
unset CC |
56 |
56 |
make |
make |
57 |
57 |
make install |
make install |
58 |
58 |
|
|
59 |
|
# it wants an "audio" entry in /etc/group with a GID of 116 |
|
60 |
|
if ! egrep -q '^audio:' /etc/group; then |
|
61 |
|
echo 'audio::116:' >>/etc/group |
|
|
59 |
|
# It wants an "audio" group. |
|
60 |
|
if ! grep -E -q '^audio:' /etc/group; then |
|
61 |
|
echo 'audio::11:' >>/etc/group |
62 |
62 |
fi |
fi |
63 |
63 |
|
|
64 |
64 |
find /nyan/$src_name/$slot -type f -name '*.la' | xargs rm -f |
find /nyan/$src_name/$slot -type f -name '*.la' | xargs rm -f |
File files/asm/user.S deleted (index 30356ef..0000000) |
1 |
|
/* |
|
2 |
|
* This assembly source code is intended to be preprocessed: |
|
3 |
|
* - don't use # comments |
|
4 |
|
* - do use your C compiler front-end with proper specific options or do |
|
5 |
|
* pipe cpp output to as (don't forget to link as an executable then) |
|
6 |
|
* |
|
7 |
|
* cpp user.S | as -o user.o; ld -o user user.o |
|
8 |
|
* |
|
9 |
|
* dbus will want an entry in /etc/passwd for user |
|
10 |
|
*/ |
|
11 |
|
|
|
12 |
|
.data |
|
13 |
|
dbus: .asciz "/nyan/dbus/current/bin/dbus-run-session" |
|
14 |
|
shell: .asciz "/bin/sh" |
|
15 |
|
arg_login: .asciz "-l" |
|
16 |
|
|
|
17 |
|
home: .asciz "HOME=/home/user" |
|
18 |
|
path: .asciz "PATH=/nyan/dbus/current/bin" |
|
19 |
|
ldpath: .asciz "LD_LIBRARY_PATH=/nyan/dbus/current/lib" |
|
20 |
|
|
|
21 |
|
argv: .quad dbus, shell, arg_login, 0 |
|
22 |
|
envp: .quad home, path, ldpath, 0 |
|
23 |
|
|
|
24 |
|
.text |
|
25 |
|
/* _start is the ELF symbol which defines the program entry point */ |
|
26 |
|
.global _start |
|
27 |
|
_start: |
|
28 |
|
mov $106, %eax /* setgid */ |
|
29 |
|
mov $1000, %rdi /* GID=1000 */ |
|
30 |
|
syscall |
|
31 |
|
mov $105, %eax /* setuid */ |
|
32 |
|
mov $1000, %rdi /* UID=1000 */ |
|
33 |
|
syscall |
|
34 |
|
mov $59, %eax /* execve */ |
|
35 |
|
mov $dbus, %rdi |
|
36 |
|
mov $argv, %rsi |
|
37 |
|
mov $envp, %rdx |
|
38 |
|
/* never returning syscall */ |
|
39 |
|
syscall |
|
40 |
|
|
|
File files/asm/user.s added (mode: 100644) (index 0000000..75aee02) |
|
1 |
|
.intel_syntax noprefix |
|
2 |
|
.intel_mnemonic |
|
3 |
|
.code64 |
|
4 |
|
|
|
5 |
|
.data |
|
6 |
|
shell: .asciz "/bin/sh" /* should be a static executable */ |
|
7 |
|
arg_login: .asciz "-l" |
|
8 |
|
home: .asciz "HOME=/home/user" |
|
9 |
|
|
|
10 |
|
.align 8,0 |
|
11 |
|
argv: .8byte 0/*shell*/,0/*arg_login*/,0 |
|
12 |
|
envp: .8byte 0/*home*/,0 |
|
13 |
|
groups: .4byte 10/*input*/,11/*audio*/,12/*video*/ |
|
14 |
|
|
|
15 |
|
.text |
|
16 |
|
/* _start is the ELF symbol which defines the program entry point */ |
|
17 |
|
.global _start |
|
18 |
|
_start: |
|
19 |
|
mov rax,116 /* setgroups syscall */ |
|
20 |
|
mov rdi,3 /* 3 groups */ |
|
21 |
|
lea rsi,qword ptr [rip+groups] |
|
22 |
|
syscall |
|
23 |
|
mov rax,119 /* setresgid */ |
|
24 |
|
mov rdi,1000 /* real GID=1000 */ |
|
25 |
|
mov rsi,1000 /* effective GID=1000 */ |
|
26 |
|
mov rdx,1000 /* saved GID=1000 */ |
|
27 |
|
syscall |
|
28 |
|
mov rax,117 /* setresuid */ |
|
29 |
|
mov rdi,1000 /* real UID=1000 */ |
|
30 |
|
mov rsi,1000 /* effective UID=1000 */ |
|
31 |
|
mov rdx,1000 /* saved UID=1000 */ |
|
32 |
|
syscall |
|
33 |
|
/* init the envp */ |
|
34 |
|
lea rax,[rip+home] |
|
35 |
|
mov qword ptr [rip+envp],rax |
|
36 |
|
/* init the argv */ |
|
37 |
|
lea rdi,byte ptr [rip+shell] /* execve[0] */ |
|
38 |
|
lea rsi,byte ptr [rip+argv] /* execve[1] */ |
|
39 |
|
lea rcx,byte ptr [rip+arg_login] |
|
40 |
|
mov qword ptr [rsi],rdi |
|
41 |
|
mov qword ptr [rsi+8],rcx |
|
42 |
|
/* execve syscall */ |
|
43 |
|
lea rdx,byte ptr [rip+envp] /* execve[2] */ |
|
44 |
|
mov rax,59 /* execve */ |
|
45 |
|
syscall |
|
46 |
|
/* boom */ |
|
47 |
|
neg rax |
|
48 |
|
mov rdi,rax |
|
49 |
|
mov rax,231 |
|
50 |
|
syscall |
File files/asm/user_nodbus.S deleted (index 07161ae..0000000) |
1 |
|
/* |
|
2 |
|
* This assembly source code is intended to be preprocessed: |
|
3 |
|
* - don't use # comments |
|
4 |
|
* - do use your C compiler front-end with proper specific options or do |
|
5 |
|
* pipe cpp output to as (don't forget to link as an executable then) |
|
6 |
|
* |
|
7 |
|
* cpp user.S | as -o user.o; ld -o user user.o |
|
8 |
|
* |
|
9 |
|
* dbus will want an entry in /etc/passwd for user |
|
10 |
|
*/ |
|
11 |
|
|
|
12 |
|
.data |
|
13 |
|
shell: .asciz "/bin/sh" |
|
14 |
|
arg_login: .asciz "-l" |
|
15 |
|
|
|
16 |
|
home: .asciz "HOME=/home/user" |
|
17 |
|
|
|
18 |
|
argv: .quad shell, arg_login, 0 |
|
19 |
|
envp: .quad home, 0 |
|
20 |
|
|
|
21 |
|
.text |
|
22 |
|
/* _start is the ELF symbol which defines the program entry point */ |
|
23 |
|
.global _start |
|
24 |
|
_start: |
|
25 |
|
mov $106, %eax /* setgid */ |
|
26 |
|
mov $1000, %rdi /* GID=1000 */ |
|
27 |
|
syscall |
|
28 |
|
mov $105, %eax /* setuid */ |
|
29 |
|
mov $1000, %rdi /* UID=1000 */ |
|
30 |
|
syscall |
|
31 |
|
mov $59, %eax /* execve */ |
|
32 |
|
mov $shell, %rdi |
|
33 |
|
mov $argv, %rsi |
|
34 |
|
mov $envp, %rdx |
|
35 |
|
/* never returning syscall */ |
|
36 |
|
syscall |
|
37 |
|
|
|
File files/asm/user_steam.S deleted (index f818ab5..0000000) |
1 |
|
/* |
|
2 |
|
* Must switch to fasm |
|
3 |
|
* |
|
4 |
|
* This assembly source code is intended to be preprocessed: |
|
5 |
|
* - don't use # comments |
|
6 |
|
* - do use your C compiler front-end with proper specific options or do |
|
7 |
|
* pipe cpp output to as (don't forget to link as an executable then) |
|
8 |
|
* |
|
9 |
|
* cpp user.S | as -o user.o; ld -o user user.o |
|
10 |
|
* |
|
11 |
|
* dbus will want an entry in /etc/passwd for user |
|
12 |
|
*/ |
|
13 |
|
|
|
14 |
|
.data |
|
15 |
|
dbus: .asciz "/nyan/dbus/current/bin/dbus-run-session" |
|
16 |
|
shell: .asciz "/bin/sh" |
|
17 |
|
shell_arg0: .asciz "-l" |
|
18 |
|
shell_arg1: .asciz "-c" |
|
19 |
|
shell_arg2: .asciz "exec /home/user/steam/steam" |
|
20 |
|
|
|
21 |
|
|
|
22 |
|
home: .asciz "HOME=/home/user" |
|
23 |
|
path: .asciz "PATH=/nyan/dbus/current/bin" |
|
24 |
|
ldpath: .asciz "LD_LIBRARY_PATH=/nyan/dbus/current/lib" |
|
25 |
|
|
|
26 |
|
argv: .quad dbus, shell, shell_arg0, shell_arg1, shell_arg2, 0 |
|
27 |
|
envp: .quad home, path, ldpath, 0 |
|
28 |
|
/* alsa audio group is 116 */ |
|
29 |
|
groups: .quad 116 |
|
30 |
|
|
|
31 |
|
.text |
|
32 |
|
/* _start is the ELF symbol which defines the program entry point */ |
|
33 |
|
.global _start |
|
34 |
|
_start: |
|
35 |
|
mov $116, %eax /* setgroups */ |
|
36 |
|
mov $1, %rdi /* 1 group */ |
|
37 |
|
mov $groups, %rsi /* audio */ |
|
38 |
|
syscall |
|
39 |
|
mov $106, %eax /* setgid */ |
|
40 |
|
mov $1000, %rdi /* GID=1000 */ |
|
41 |
|
syscall |
|
42 |
|
mov $105, %eax /* setuid */ |
|
43 |
|
mov $1000, %rdi /* UID=1000 */ |
|
44 |
|
syscall |
|
45 |
|
mov $59, %eax /* execve */ |
|
46 |
|
mov $dbus, %rdi |
|
47 |
|
mov $argv, %rsi |
|
48 |
|
mov $envp, %rdx |
|
49 |
|
/* never returning syscall */ |
|
50 |
|
syscall |
|
51 |
|
|
|
File files/asm/user_steam_nodbus.S deleted (index c8dde5a..0000000) |
1 |
|
/* |
|
2 |
|
* Must switch to fasm |
|
3 |
|
* |
|
4 |
|
* This assembly source code is intended to be preprocessed: |
|
5 |
|
* - don't use # comments |
|
6 |
|
* - do use your C compiler front-end with proper specific options or do |
|
7 |
|
* pipe cpp output to as (don't forget to link as an executable then) |
|
8 |
|
* |
|
9 |
|
* cpp user.S | as -o user.o; ld -o user user.o |
|
10 |
|
*/ |
|
11 |
|
|
|
12 |
|
.data |
|
13 |
|
shell: .asciz "/bin/sh" |
|
14 |
|
shell_arg0: .asciz "-l" |
|
15 |
|
shell_arg1: .asciz "-c" |
|
16 |
|
shell_arg2: .asciz "exec /home/user/steam/steam -no-cef-sandbox" |
|
17 |
|
|
|
18 |
|
home: .asciz "HOME=/home/user" |
|
19 |
|
|
|
20 |
|
argv: .quad shell, shell_arg0, shell_arg1, shell_arg2, 0 |
|
21 |
|
envp: .quad home, 0 |
|
22 |
|
/* alsa audio group is 116 */ |
|
23 |
|
groups: .quad 116 |
|
24 |
|
|
|
25 |
|
.text |
|
26 |
|
/* _start is the ELF symbol which defines the program entry point */ |
|
27 |
|
.global _start |
|
28 |
|
_start: |
|
29 |
|
mov $116, %eax /* setgroups */ |
|
30 |
|
mov $1, %rdi /* 1 group */ |
|
31 |
|
mov $groups, %rsi /* audio */ |
|
32 |
|
syscall |
|
33 |
|
mov $106, %eax /* setgid */ |
|
34 |
|
mov $1000, %rdi /* GID=1000 */ |
|
35 |
|
syscall |
|
36 |
|
mov $105, %eax /* setuid */ |
|
37 |
|
mov $1000, %rdi /* UID=1000 */ |
|
38 |
|
syscall |
|
39 |
|
mov $59, %eax /* execve */ |
|
40 |
|
mov $shell, %rdi |
|
41 |
|
mov $argv, %rsi |
|
42 |
|
mov $envp, %rdx |
|
43 |
|
/* never returning syscall */ |
|
44 |
|
syscall |
|
45 |
|
|
|