Desktop on the Linux (and *BSD of course) . . . youre doing it - - PowerPoint PPT Presentation

desktop on the linux and bsd of course
SMART_READER_LITE
LIVE PREVIEW

Desktop on the Linux (and *BSD of course) . . . youre doing it - - PowerPoint PPT Presentation

Desktop on the Linux (and *BSD of course) . . . youre doing it confused? weird? strange? wrong? Who? Wolfgang datenwolf Draxinger When? 27c3, 2010-12-27 DISCLAIMER This talk is: highly opinionated biased born out of frustration .


slide-1
SLIDE 1

Desktop on the Linux (and *BSD of course). . .

you’re doing it confused? weird? strange? wrong?

Who?

Wolfgang ’datenwolf’ Draxinger

When?

27c3, 2010-12-27

slide-2
SLIDE 2

DISCLAIMER

This talk is: highly opinionated biased born out of frustration . . . and anger

slide-3
SLIDE 3

DISCLAIMER II Linux is not Unix. Nevertheless I’ll mix the terms because I’m just to lazy to distiguish everytime. I hope you’re okay with that.

slide-4
SLIDE 4

DISCLAIMER II Linux is not Unix. Nevertheless I’ll mix the terms because I’m just to lazy to distiguish everytime. I hope you’re okay with that.

slide-5
SLIDE 5

DISCLAIMER II Linux is not Unix. Nevertheless I’ll mix the terms because I’m just to lazy to distiguish everytime. I hope you’re okay with that.

slide-6
SLIDE 6

The situation

I work as a systems administrator: University’s physics student computers. ≥ 3500 users! I’m the “problem solver” there. My pleasure hacking projects are about: realtime graphics realtime simulation systems programming a.k.a. game engines.⇒ highly optimized, resource aware code.

slide-7
SLIDE 7

The situation

I work as a systems administrator: University’s physics student computers. ≥ 3500 users! I’m the “problem solver” there. My pleasure hacking projects are about: realtime graphics realtime simulation systems programming a.k.a. game engines.⇒ highly optimized, resource aware code.

slide-8
SLIDE 8

The situation

I work as a systems administrator: University’s physics student computers. ≥ 3500 users! I’m the “problem solver” there. My pleasure hacking projects are about: realtime graphics realtime simulation systems programming a.k.a. game engines.⇒ highly optimized, resource aware code.

slide-9
SLIDE 9

The situation

I work as a systems administrator: University’s physics student computers. ≥ 3500 users! I’m the “problem solver” there. My pleasure hacking projects are about: realtime graphics realtime simulation systems programming a.k.a. game engines.⇒ highly optimized, resource aware code.

slide-10
SLIDE 10

The situation

I work as a systems administrator: University’s physics student computers. ≥ 3500 users! I’m the “problem solver” there. My pleasure hacking projects are about: realtime graphics realtime simulation systems programming a.k.a. game engines.⇒ highly optimized, resource aware code.

slide-11
SLIDE 11

Linux desktop distributions have become evil!

With each and every new version of OpenSuSE, Ubuntu, Fedora problems got worse. Most of the problems we encounter are attributed to automatisms. It’s no longer “set and forget”.

slide-12
SLIDE 12

Linux desktop distributions have become evil!

With each and every new version of OpenSuSE, Ubuntu, Fedora problems got worse. Most of the problems we encounter are attributed to automatisms. It’s no longer “set and forget”.

slide-13
SLIDE 13

Linux desktop distributions have become evil!

With each and every new version of OpenSuSE, Ubuntu, Fedora problems got worse. Most of the problems we encounter are attributed to automatisms. It’s no longer “set and forget”.

slide-14
SLIDE 14

Modern Desktops have Multimedia!

slide-15
SLIDE 15

Your typical Multimedia Framework

Playback Module Graph

Input Demuxer Decoder Filter Output Decoder Filter Output

...

file http rtmp rtsp ... avi wav mp4 mkv

  • gg

mov ... MP3 Vorbis AAC FLAC h264 XviD ... downmix replaygain deinterlaceing brightnes contrast ... X11/XVideo VDPAU OpenGL ALSA PulseAudio OSS ...

slide-16
SLIDE 16

Provides huge number of modules. "Fire and Forget" graph generator included. unfortunately not quite stable.

slide-17
SLIDE 17

Provides huge number of modules. "Fire and Forget" graph generator included. unfortunately not quite stable.

slide-18
SLIDE 18

Phonon

Multimedia-Meta-API – abstraction layer to access different multimedia frameworks through a single API. Part of the KDE project Builds filter graphs using capabilities

  • f the current backend.

Designed to allow switching the backend in mid-operation (why?) Available backends (Linux)

Xine VLC GStreamer (unmantained)

Filter graph building logic must be provided for every backend!

slide-19
SLIDE 19

Phonon

Multimedia-Meta-API – abstraction layer to access different multimedia frameworks through a single API. Part of the KDE project Builds filter graphs using capabilities

  • f the current backend.

Designed to allow switching the backend in mid-operation (why?) Available backends (Linux)

Xine VLC GStreamer (unmantained)

Filter graph building logic must be provided for every backend!

slide-20
SLIDE 20

Phonon

Multimedia-Meta-API – abstraction layer to access different multimedia frameworks through a single API. Part of the KDE project Builds filter graphs using capabilities

  • f the current backend.

Designed to allow switching the backend in mid-operation (why?) Available backends (Linux)

Xine VLC GStreamer (unmantained)

Filter graph building logic must be provided for every backend!

slide-21
SLIDE 21

Phonon

Multimedia-Meta-API – abstraction layer to access different multimedia frameworks through a single API. Part of the KDE project Builds filter graphs using capabilities

  • f the current backend.

Designed to allow switching the backend in mid-operation (why?) Available backends (Linux)

Xine VLC GStreamer (unmantained)

Filter graph building logic must be provided for every backend!

slide-22
SLIDE 22

Phonon

Multimedia-Meta-API – abstraction layer to access different multimedia frameworks through a single API. Part of the KDE project Builds filter graphs using capabilities

  • f the current backend.

Designed to allow switching the backend in mid-operation (why?) Available backends (Linux)

Xine VLC GStreamer (unmantained)

Filter graph building logic must be provided for every backend!

slide-23
SLIDE 23

Designed as a better ESD:

mix sound provide audio capture to multiple clients simultanously sound over network (e.g. alongside remote X11)

Became sort of a media framework of it’s own: Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server. –[PulseAudio homepage]

slide-24
SLIDE 24

Designed as a better ESD:

mix sound provide audio capture to multiple clients simultanously sound over network (e.g. alongside remote X11)

Became sort of a media framework of it’s own: Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server. –[PulseAudio homepage]

slide-25
SLIDE 25

Functionality Matrix

slide-26
SLIDE 26

Let’s hear some music

supports 96kHz 24bps 6 channels Vorbis 22.05kHz 16bps 2 channels

slide-27
SLIDE 27

Let’s hear some music

supports 96kHz 24bps 6 channels Vorbis 22.05kHz 16bps 2 channels

Phonon

file GStreamer

slide-28
SLIDE 28

Let’s hear some music

supports 96kHz 24bps 6 channels Vorbis 22.05kHz 16bps 2 channels

Phonon

file GStreamer PulseAudio Client

slide-29
SLIDE 29

Let’s hear some music

supports 96kHz 24bps 6 channels Vorbis 22.05kHz 16bps 2 channels

Phonon

file GStreamer PulseAudio Client PulseAudio Server

slide-30
SLIDE 30

Let’s hear some music

supports 96kHz 24bps 6 channels Vorbis 22.05kHz 16bps 2 channels

Phonon

file GStreamer PulseAudio Client PulseAudio Server gst-ffmpeg

libavcodec libsamplerate

slide-31
SLIDE 31

Let’s hear some music

supports 96kHz 24bps 6 channels Vorbis 22.05kHz 16bps 2 channels

Phonon

file GStreamer PulseAudio Client PulseAudio Server gst-ffmpeg

libavcodec libsamplerate

slide-32
SLIDE 32

Let’s hear some music

supports 96kHz 24bps 6 channels Vorbis 22.05kHz 16bps 2 channels

Phonon

file GStreamer PulseAudio Client PulseAudio Server gst-ffmpeg

libavcodec libsamplerate

here be sample- rate filters, too

slide-33
SLIDE 33

Let’s hear some music

supports 96kHz 24bps 6 channels Vorbis 22.05kHz 16bps 2 channels

Phonon

file GStreamer PulseAudio Client PulseAudio Server gst-ffmpeg

libavcodec libsamplerate

slide-34
SLIDE 34

Logins Complicated

slide-35
SLIDE 35

Tasks of a X Display Manager

Start X11 server, setup MIT-Cookie (XAUTHORITY) Show Greeter, Login Dialog (optional) Allow for choosing desktop environment and localization options (historically) provide XDMCP – don’t use this nowadays (insecure)

slide-36
SLIDE 36

Tasks of a X Display Manager

Start X11 server, setup MIT-Cookie (XAUTHORITY) Show Greeter, Login Dialog (optional) Allow for choosing desktop environment and localization options (historically) provide XDMCP – don’t use this nowadays (insecure)

slide-37
SLIDE 37

User Interaction

enter username enter password maybe set session type and localization All in all a very short experience. The less interaction, the better.

slide-38
SLIDE 38

User Interaction

enter username enter password maybe set session type and localization All in all a very short experience. The less interaction, the better.

slide-39
SLIDE 39

User Interaction

enter username enter password maybe set session type and localization All in all a very short experience. The less interaction, the better.

slide-40
SLIDE 40

User Interaction

enter username enter password maybe set session type and localization All in all a very short experience. The less interaction, the better.

slide-41
SLIDE 41

GDM ≥ 2.21

It’s modal (users tend to mistake it for a screen lock). Starts a full blown Gnome session for a simple login. Offers less configuration options than older versions.

slide-42
SLIDE 42

GDM ≥ 2.21

It’s modal (users tend to mistake it for a screen lock). Starts a full blown Gnome session for a simple login. Offers less configuration options than older versions.

slide-43
SLIDE 43

GDM ≥ 2.21

It’s modal (users tend to mistake it for a screen lock). Starts a full blown Gnome session for a simple login. Offers less configuration options than older versions.

slide-44
SLIDE 44

GDM ≥ 2.21

It’s modal (users tend to mistake it for a screen lock). Starts a full blown Gnome session for a simple login. Offers less configuration options than older versions.

slide-45
SLIDE 45

GDM ≥ 2.21 – A Gnome session

slide-46
SLIDE 46

GDM ≥ 2.21 – A Gnome session highlighted

slide-47
SLIDE 47

GDM ≥ 2.21 – Sideshow Dependees

slide-48
SLIDE 48

GDM ≥ 2.21 – Why a Gnome session?

By default, GDM is shipped with files which will autostart the gdm-simple-greeter login GUI greeter itself, the gnome-power-manager application, the gnome-settings-daemon, and the metacity window

  • manager. These programs are needed for the greeter

program to work. – [GDM documentation]

slide-49
SLIDE 49

After utmp and wtmp, we proudly present. . .

ConsoleKit

slide-50
SLIDE 50

What is ConsoleKit

ConsoleKit is a framework for keeping track of the various users, sessions, and seats present on a system. It provides a mechanism for software to react to changes of any of these items or of any of the metadata associated with them. –[ConsoleKit documentation (2010-12-25)]

slide-51
SLIDE 51

Why do we need it? Defining the Problem

To be written.

Relevant art

To be written. –[ConsoleKit documentation (2010-12-25)] http://www.freedesktop.org/software/ ConsoleKit/doc/ConsoleKit.html

slide-52
SLIDE 52

So what does it do?

It’s a Seat aware session manager. A Seat:

Input Devices Output Devices Permissions per User (Alice may play music, Bob may burn DVDs)

Tracks the user Grants permissions dynamically It uses D-Bus!

slide-53
SLIDE 53

So what does it do?

It’s a Seat aware session manager. A Seat:

Input Devices Output Devices Permissions per User (Alice may play music, Bob may burn DVDs)

Tracks the user Grants permissions dynamically It uses D-Bus!

slide-54
SLIDE 54

So what does it do?

It’s a Seat aware session manager. A Seat:

Input Devices Output Devices Permissions per User (Alice may play music, Bob may burn DVDs)

Tracks the user Grants permissions dynamically It uses D-Bus!

slide-55
SLIDE 55

So what does it do?

It’s a Seat aware session manager. A Seat:

Input Devices Output Devices Permissions per User (Alice may play music, Bob may burn DVDs)

Tracks the user Grants permissions dynamically It uses D-Bus!

slide-56
SLIDE 56

So what does it do?

It’s a Seat aware session manager. A Seat:

Input Devices Output Devices Permissions per User (Alice may play music, Bob may burn DVDs)

Tracks the user Grants permissions dynamically It uses D-Bus!

slide-57
SLIDE 57

I’m sorry to tell you, but it’s broken!

Unix Philosophy: “Something’s either a process, or a file”. File permissions and ACLs only applied upon open. Once you got an FD, permissions and ACL don’t apply anymore. ConsoleKit is easily circumvented Oh, and when it fails, you’re borked. (Live Demo)

slide-58
SLIDE 58

I’m sorry to tell you, but it’s broken!

Unix Philosophy: “Something’s either a process, or a file”. File permissions and ACLs only applied upon open. Once you got an FD, permissions and ACL don’t apply anymore. ConsoleKit is easily circumvented Oh, and when it fails, you’re borked. (Live Demo)

slide-59
SLIDE 59

I’m sorry to tell you, but it’s broken!

Unix Philosophy: “Something’s either a process, or a file”. File permissions and ACLs only applied upon open. Once you got an FD, permissions and ACL don’t apply anymore. ConsoleKit is easily circumvented Oh, and when it fails, you’re borked. (Live Demo)

slide-60
SLIDE 60

I’m sorry to tell you, but it’s broken!

Unix Philosophy: “Something’s either a process, or a file”. File permissions and ACLs only applied upon open. Once you got an FD, permissions and ACL don’t apply anymore. ConsoleKit is easily circumvented Oh, and when it fails, you’re borked. (Live Demo)

slide-61
SLIDE 61

I’m sorry to tell you, but it’s broken!

Unix Philosophy: “Something’s either a process, or a file”. File permissions and ACLs only applied upon open. Once you got an FD, permissions and ACL don’t apply anymore. ConsoleKit is easily circumvented Oh, and when it fails, you’re borked. (Live Demo)

slide-62
SLIDE 62

My Advice: Stick with pam_console and groups.

slide-63
SLIDE 63

D-Bus

slide-64
SLIDE 64

Applications sharing a desktop shall work together.

Several IPC methods over the years Inter Client Exchange Bonobo/CORBA (Gnome) dcop (KDE ≤ 3.x) . . . and some more. Lightweight things, like music player remote control.

slide-65
SLIDE 65

Applications sharing a desktop shall work together.

Several IPC methods over the years Inter Client Exchange Bonobo/CORBA (Gnome) dcop (KDE ≤ 3.x) . . . and some more. Lightweight things, like music player remote control.

slide-66
SLIDE 66

A unified IPC mechanism

D-Bus was originally intended to serve as a unified Desktop IPC. Was soon expanded to serve as a system wide message passing system.

slide-67
SLIDE 67

A unified IPC mechanism

D-Bus was originally intended to serve as a unified Desktop IPC. Was soon expanded to serve as a system wide message passing system.

slide-68
SLIDE 68

So, everything is fine, rainbows and unicorns, right?! To me, the whole thing doesn’t look right.

slide-69
SLIDE 69

So, everything is fine, rainbows and unicorns, right?! To me, the whole thing doesn’t look right.

slide-70
SLIDE 70

Java-esque naming

D-Bus uses names like

  • rg.freedesktop.Hal.Manager

/com/mycompany/TextFileManager – recommended to use domain name.

slide-71
SLIDE 71

Java-esque naming

D-Bus uses names like

  • rg.freedesktop.Hal.Manager

/com/mycompany/TextFileManager – recommended to use domain name.

slide-72
SLIDE 72

Narcistic Namespacing

Names don’t reveal the function Without functional grouping each service defines it’s very own interface What if a Name get’s changed?

Ethereal → Wireshark wxWindows → wxWidgets

Just take a short look at Linux’ SysFS for an example of usefull namespacing.

slide-73
SLIDE 73

Narcistic Namespacing

Names don’t reveal the function Without functional grouping each service defines it’s very own interface What if a Name get’s changed?

Ethereal → Wireshark wxWindows → wxWidgets

Just take a short look at Linux’ SysFS for an example of usefull namespacing.

slide-74
SLIDE 74

Narcistic Namespacing

Names don’t reveal the function Without functional grouping each service defines it’s very own interface What if a Name get’s changed?

Ethereal → Wireshark wxWindows → wxWidgets

Just take a short look at Linux’ SysFS for an example of usefull namespacing.

slide-75
SLIDE 75

Narcistic Namespacing

Names don’t reveal the function Without functional grouping each service defines it’s very own interface What if a Name get’s changed?

Ethereal → Wireshark wxWindows → wxWidgets

Just take a short look at Linux’ SysFS for an example of usefull namespacing.

slide-76
SLIDE 76

No transparent networking

Yes, D-Bus has TCP transport, but: no authentication no authorization no encryption Srsly? A network transport no older than 5 years, without any means for security? And it’s quite a mess to get to work nevertheless.

slide-77
SLIDE 77

No transparent networking

Yes, D-Bus has TCP transport, but: no authentication no authorization no encryption Srsly? A network transport no older than 5 years, without any means for security? And it’s quite a mess to get to work nevertheless.

slide-78
SLIDE 78

No transparent networking

Yes, D-Bus has TCP transport, but: no authentication no authorization no encryption Srsly? A network transport no older than 5 years, without any means for security? And it’s quite a mess to get to work nevertheless.

slide-79
SLIDE 79

Must be setup additionall to X11

session bus is independent from X11 ⇒ every GUI program has to do multiple bookkeeping

X11 D-Bus

ssh -X . . ., what about that? Nothing particularily difficult to implement, but that would add complexity, for only little gain.

slide-80
SLIDE 80

Must be setup additionall to X11

session bus is independent from X11 ⇒ every GUI program has to do multiple bookkeeping

X11 D-Bus

ssh -X . . ., what about that? Nothing particularily difficult to implement, but that would add complexity, for only little gain.

slide-81
SLIDE 81

Must be setup additionall to X11

session bus is independent from X11 ⇒ every GUI program has to do multiple bookkeeping

X11 D-Bus

ssh -X . . ., what about that? Nothing particularily difficult to implement, but that would add complexity, for only little gain.

slide-82
SLIDE 82

Must be setup additionall to X11

session bus is independent from X11 ⇒ every GUI program has to do multiple bookkeeping

X11 D-Bus

ssh -X . . ., what about that? Nothing particularily difficult to implement, but that would add complexity, for only little gain.

slide-83
SLIDE 83

Must be setup additionall to X11

session bus is independent from X11 ⇒ every GUI program has to do multiple bookkeeping

X11 D-Bus

ssh -X . . ., what about that? Nothing particularily difficult to implement, but that would add complexity, for only little gain.

slide-84
SLIDE 84

D-Bus is FreeDesktop’s Hammer

Each and everything done by FreeDesktop is tied to D-Bus somehow. Even things where D-Bus makes no sense. Case in Point: Status Notifier Items You know, SysTray.

slide-85
SLIDE 85

D-Bus is FreeDesktop’s Hammer

Each and everything done by FreeDesktop is tied to D-Bus somehow. Even things where D-Bus makes no sense. Case in Point: Status Notifier Items You know, SysTray.

slide-86
SLIDE 86

D-Bus is FreeDesktop’s Hammer

Each and everything done by FreeDesktop is tied to D-Bus somehow. Even things where D-Bus makes no sense. Case in Point: Status Notifier Items You know, SysTray.

slide-87
SLIDE 87

D-Bus is FreeDesktop’s Hammer

Each and everything done by FreeDesktop is tied to D-Bus somehow. Even things where D-Bus makes no sense. Case in Point: Status Notifier Items You know, SysTray.

slide-88
SLIDE 88

XSystemTray

Old method: SysTray is a special kind of sub-window manager. Each item a own X11 window ⇒ one could use everything X11 provides to draw it – serverside. (GPU acceleration FTW) It works for every X11 client, independent of host, transport and connection.

slide-89
SLIDE 89

Status Notifier

Status Notifier uses D-Bus for transport, graphical items are transported as raw pixmaps or SVG. (dynamic updates?) Status Notifier only available to programs having access to the D-Bus (remember, remote X11 vs. D-Bus).

slide-90
SLIDE 90

If you care about common look and feel: Define user interface guidelies, provide a common library. That’s actually done by GTK+ and Qt (the library thing).

slide-91
SLIDE 91

If you care about common look and feel: Define user interface guidelies, provide a common library. That’s actually done by GTK+ and Qt (the library thing).

slide-92
SLIDE 92

That horse can carry only so much.

D-Bus doesn’t scale! There’s actually been made the suggestion to give Linux a new special D-Bus socket type, to overcome routing bottlenecks.

slide-93
SLIDE 93

That horse can carry only so much.

D-Bus doesn’t scale! There’s actually been made the suggestion to give Linux a new special D-Bus socket type, to overcome routing bottlenecks.

slide-94
SLIDE 94

There are better tools

Instead of D-Bus we could use IPv6 * Local Multicast. scales well can be versatilely routed (address rewriting) cryptographic batteries included (IPv6 mandates IPSec – Unicast) no single point of failure (D-Bus daemon) – well, the kernel may crash, but then you’ve got other problems. This idea courtesy by Fefe.

slide-95
SLIDE 95

There are better tools

Instead of D-Bus we could use IPv6 * Local Multicast. scales well can be versatilely routed (address rewriting) cryptographic batteries included (IPv6 mandates IPSec – Unicast) no single point of failure (D-Bus daemon) – well, the kernel may crash, but then you’ve got other problems. This idea courtesy by Fefe.

slide-96
SLIDE 96

There are better tools

Instead of D-Bus we could use IPv6 * Local Multicast. scales well can be versatilely routed (address rewriting) cryptographic batteries included (IPv6 mandates IPSec – Unicast) no single point of failure (D-Bus daemon) – well, the kernel may crash, but then you’ve got other problems. This idea courtesy by Fefe.

slide-97
SLIDE 97

There are better tools

Instead of D-Bus we could use IPv6 * Local Multicast. scales well can be versatilely routed (address rewriting) cryptographic batteries included (IPv6 mandates IPSec – Unicast) no single point of failure (D-Bus daemon) – well, the kernel may crash, but then you’ve got other problems. This idea courtesy by Fefe.

slide-98
SLIDE 98

There are better tools

Instead of D-Bus we could use IPv6 * Local Multicast. scales well can be versatilely routed (address rewriting) cryptographic batteries included (IPv6 mandates IPSec – Unicast) no single point of failure (D-Bus daemon) – well, the kernel may crash, but then you’ve got other problems. This idea courtesy by Fefe.

slide-99
SLIDE 99

There are better tools

Instead of D-Bus we could use IPv6 * Local Multicast. scales well can be versatilely routed (address rewriting) cryptographic batteries included (IPv6 mandates IPSec – Unicast) no single point of failure (D-Bus daemon) – well, the kernel may crash, but then you’ve got other problems. This idea courtesy by Fefe.

slide-100
SLIDE 100

There are better tools

Instead of D-Bus we could use IPv6 * Local Multicast. scales well can be versatilely routed (address rewriting) cryptographic batteries included (IPv6 mandates IPSec – Unicast) no single point of failure (D-Bus daemon) – well, the kernel may crash, but then you’ve got other problems. This idea courtesy by Fefe.

slide-101
SLIDE 101

PolicyKit

slide-102
SLIDE 102

What is PolicyKit

PolicyKit is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes: It is a framework for centralizing the decision making process with respect to granting access to privileged operations for unprivileged

  • applications. PolicyKit is specifically targeting applications

in rich desktop environments on multi-user UNIX-like

  • perating systems.

–[PolicyKit homepage]

slide-103
SLIDE 103

PolicyKit

Oftenly compared to sudo

sudo escalates PolicyKit authorizes

Uses D-Bus. . .

slide-104
SLIDE 104

Authorizing means

A program capable of privileged action is commaned to perform a task. Before this task is performed, PolicyKit is used to ask the user for permission

If the user itself has no permission ⇒ Deny If the user authenticates the action ⇒ Execute it.

⇒ The privileged programm is running all the time, or started by pkexec To me this sounds prone to logic errors

  • n the privileged side..

Could we attack the privileged program through the action request?

slide-105
SLIDE 105

Authorizing means

A program capable of privileged action is commaned to perform a task. Before this task is performed, PolicyKit is used to ask the user for permission

If the user itself has no permission ⇒ Deny If the user authenticates the action ⇒ Execute it.

⇒ The privileged programm is running all the time, or started by pkexec To me this sounds prone to logic errors

  • n the privileged side..

Could we attack the privileged program through the action request?

slide-106
SLIDE 106

Authorizing means

A program capable of privileged action is commaned to perform a task. Before this task is performed, PolicyKit is used to ask the user for permission

If the user itself has no permission ⇒ Deny If the user authenticates the action ⇒ Execute it.

⇒ The privileged programm is running all the time, or started by pkexec To me this sounds prone to logic errors

  • n the privileged side..

Could we attack the privileged program through the action request?

slide-107
SLIDE 107

Asking per task is a bad idea anyway

The whole thing is much like Windows UAC: The user gets nagged about authorizing this and that everytime. Entering privileged realms itself should be protected. Privileged stuff should not be required to be set so oftenly, that a convenient way to ask the user is required at all.

slide-108
SLIDE 108

Asking per task is a bad idea anyway

The whole thing is much like Windows UAC: The user gets nagged about authorizing this and that everytime. Entering privileged realms itself should be protected. Privileged stuff should not be required to be set so oftenly, that a convenient way to ask the user is required at all.

slide-109
SLIDE 109

Asking per task is a bad idea anyway

The whole thing is much like Windows UAC: The user gets nagged about authorizing this and that everytime. Entering privileged realms itself should be protected. Privileged stuff should not be required to be set so oftenly, that a convenient way to ask the user is required at all.

slide-110
SLIDE 110

Automatisms = Things Just Work

slide-111
SLIDE 111

NetworkManager

I think I invented it, or at least came up with that idea: http://forums.gentoo.org/ viewtopic-t-163808-highlight-.html Looking for program. . . that is automatically setting the network interfaces, depending on the devices connected to. E.g. I’d like to configure my eth0 connection to either DHCP if it find’s a certain host via MAC or to a static IP if it detects another host. Also I need something similair for WLAN, depending on the found ESSID and/or the strongest signal. Also it should work as a daemon, so that it a physical connection gets lost automatically the route tables and resolv.conf are adjusted, and vice versa. –[I in Gentoo forums 2004-04-20]

slide-112
SLIDE 112

Sorry about that

Today’s situation Either you’re constantly roaming networks, then the network should provide the configuration and you don’t care. Or your system is statically bound to a certain network, but then a user must not change anything. GSM/UMTS/LTE? Similary: About every 3G modem can be configured to act as a network interface. The rest, see above.

slide-113
SLIDE 113

Sorry about that

Today’s situation Either you’re constantly roaming networks, then the network should provide the configuration and you don’t care. Or your system is statically bound to a certain network, but then a user must not change anything. GSM/UMTS/LTE? Similary: About every 3G modem can be configured to act as a network interface. The rest, see above.

slide-114
SLIDE 114

Sorry about that

Today’s situation Either you’re constantly roaming networks, then the network should provide the configuration and you don’t care. Or your system is statically bound to a certain network, but then a user must not change anything. GSM/UMTS/LTE? Similary: About every 3G modem can be configured to act as a network interface. The rest, see above.

slide-115
SLIDE 115

Sorry about that

Today’s situation Either you’re constantly roaming networks, then the network should provide the configuration and you don’t care. Or your system is statically bound to a certain network, but then a user must not change anything. GSM/UMTS/LTE? Similary: About every 3G modem can be configured to act as a network interface. The rest, see above.

slide-116
SLIDE 116

Ubuntu Desktop + NetworkManager

Your network connection will only come up, after you log on. WTF?! . . . can be configured otherweise. This doesn’t just work.

slide-117
SLIDE 117

Ubuntu Desktop + NetworkManager

Your network connection will only come up, after you log on. WTF?! . . . can be configured otherweise. This doesn’t just work.

slide-118
SLIDE 118

Ubuntu Desktop + NetworkManager

Your network connection will only come up, after you log on. WTF?! . . . can be configured otherweise. This doesn’t just work.

slide-119
SLIDE 119

Removeable Storage Media

USB Thumb drive get’s plugged in: Many methods so far: automounters (until ca. 2002) fstab adjusters (I still prefer this) ivman (ca. 2004) pmount hal-mount Currently: UDisks

slide-120
SLIDE 120

Removeable Storage Media

USB Thumb drive get’s plugged in: Many methods so far: automounters (until ca. 2002) fstab adjusters (I still prefer this) ivman (ca. 2004) pmount hal-mount Currently: UDisks

slide-121
SLIDE 121

None of these tackles the problem itself

It boils down to: A storage medium must be mounted to be accessible (easy) After its use it must be cleanly synched and unmounted before disconnecting, otherwise data is lost (hard). Users don’t really understand about the need for synching/unmounting, they did click the “Save” button, so why’d not saved yet? I understand my audience, or at least the majority understand the problem though, right? mount -o sync not such a good solution, either.

slide-122
SLIDE 122

None of these tackles the problem itself

It boils down to: A storage medium must be mounted to be accessible (easy) After its use it must be cleanly synched and unmounted before disconnecting, otherwise data is lost (hard). Users don’t really understand about the need for synching/unmounting, they did click the “Save” button, so why’d not saved yet? I understand my audience, or at least the majority understand the problem though, right? mount -o sync not such a good solution, either.

slide-123
SLIDE 123

None of these tackles the problem itself

It boils down to: A storage medium must be mounted to be accessible (easy) After its use it must be cleanly synched and unmounted before disconnecting, otherwise data is lost (hard). Users don’t really understand about the need for synching/unmounting, they did click the “Save” button, so why’d not saved yet? I understand my audience, or at least the majority understand the problem though, right? mount -o sync not such a good solution, either.

slide-124
SLIDE 124

None of these tackles the problem itself

It boils down to: A storage medium must be mounted to be accessible (easy) After its use it must be cleanly synched and unmounted before disconnecting, otherwise data is lost (hard). Users don’t really understand about the need for synching/unmounting, they did click the “Save” button, so why’d not saved yet? I understand my audience, or at least the majority understand the problem though, right? mount -o sync not such a good solution, either.

slide-125
SLIDE 125

I don’t know of any good solution either. But just providing nicer looking buttons won’t help. Maybe this problem will silently go away? Everything stored in the Cloud . . . → has it’s own wealth of problems. Discussed on this congress.

slide-126
SLIDE 126

I don’t know of any good solution either. But just providing nicer looking buttons won’t help. Maybe this problem will silently go away? Everything stored in the Cloud . . . → has it’s own wealth of problems. Discussed on this congress.

slide-127
SLIDE 127

I don’t know of any good solution either. But just providing nicer looking buttons won’t help. Maybe this problem will silently go away? Everything stored in the Cloud . . . → has it’s own wealth of problems. Discussed on this congress.

slide-128
SLIDE 128

I don’t know of any good solution either. But just providing nicer looking buttons won’t help. Maybe this problem will silently go away? Everything stored in the Cloud . . . → has it’s own wealth of problems. Discussed on this congress.

slide-129
SLIDE 129

I don’t know of any good solution either. But just providing nicer looking buttons won’t help. Maybe this problem will silently go away? Everything stored in the Cloud . . . → has it’s own wealth of problems. Discussed on this congress.

slide-130
SLIDE 130

One API to configure them all. . .

slide-131
SLIDE 131

GConf

Daemon and library providing unified interface to configuration data. Hierachical, key structured database Open to various storage backends, but so far

keys structured by directories values in XML files (may also contain keys)

Single point of failure Much like the Windows registry

slide-132
SLIDE 132

GConf

Daemon and library providing unified interface to configuration data. Hierachical, key structured database Open to various storage backends, but so far

keys structured by directories values in XML files (may also contain keys)

Single point of failure Much like the Windows registry

slide-133
SLIDE 133

GConf

Daemon and library providing unified interface to configuration data. Hierachical, key structured database Open to various storage backends, but so far

keys structured by directories values in XML files (may also contain keys)

Single point of failure Much like the Windows registry

slide-134
SLIDE 134

XSettings

X11 centric configuration system Colours, Mouse Pointers Input devices bahaviour . . . eh, don’t we have Xrm for that?

slide-135
SLIDE 135

XSettings

X11 centric configuration system Colours, Mouse Pointers Input devices bahaviour . . . eh, don’t we have Xrm for that?

slide-136
SLIDE 136

What are the claimed problems of Xrm?

All settings in one single property of the root window. No fine grained access to settings Changes to settings not easily detectible Large amount of data to process just to retrieve a very small subset from it.

slide-137
SLIDE 137

Proposal of XSettings

Settings managed by a XSettings daemon, providing a (invisible) settings window (remember, single point of failure). Serial numbers to identify changed settings Data stored in binary format, with no endianess enforced – lolwut? Sounds like fun:

Integer overflows Buffer overruns Shellcode injection

slide-138
SLIDE 138

Proposal of XSettings

Settings managed by a XSettings daemon, providing a (invisible) settings window (remember, single point of failure). Serial numbers to identify changed settings Data stored in binary format, with no endianess enforced – lolwut? Sounds like fun:

Integer overflows Buffer overruns Shellcode injection

slide-139
SLIDE 139

Do these people suffer from schizophrenia?

The Xrm database stores all information in a single text property on the root window. This makes it difficult to determine what settings have changed; it is necessary to parse the property and do string comparisons. And later on in the very same document: Why use a single property for all settings? Using a single property has several advantages. First, retrieving all settings takes only a single round-trip to the server instead of a round-trip for each settings. Second, it means that when multiple settings can be changed at

  • nce, only a single notification is received by clients, and

clients will see interrelated properties changed in an atomic fashion.

slide-140
SLIDE 140

Do these people suffer from schizophrenia?

The Xrm database stores all information in a single text property on the root window. This makes it difficult to determine what settings have changed; it is necessary to parse the property and do string comparisons. And later on in the very same document: Why use a single property for all settings? Using a single property has several advantages. First, retrieving all settings takes only a single round-trip to the server instead of a round-trip for each settings. Second, it means that when multiple settings can be changed at

  • nce, only a single notification is received by clients, and

clients will see interrelated properties changed in an atomic fashion.

slide-141
SLIDE 141

Zombies

. . . aim for the head.

slide-142
SLIDE 142

HAL

Hardware Abstraction Layer A better backronym would be Hardware Annotation Library. Huge crapload of unreadable and unmaintainable XML files. Officially deprecated! Though still in use by some Distros – (aim for the. . ., well, you know what to do).

slide-143
SLIDE 143

HAL

Hardware Abstraction Layer A better backronym would be Hardware Annotation Library. Huge crapload of unreadable and unmaintainable XML files. Officially deprecated! Though still in use by some Distros – (aim for the. . ., well, you know what to do).

slide-144
SLIDE 144

HAL

Hardware Abstraction Layer A better backronym would be Hardware Annotation Library. Huge crapload of unreadable and unmaintainable XML files. Officially deprecated! Though still in use by some Distros – (aim for the. . ., well, you know what to do).

slide-145
SLIDE 145

HAL

Hardware Abstraction Layer A better backronym would be Hardware Annotation Library. Huge crapload of unreadable and unmaintainable XML files. Officially deprecated! Though still in use by some Distros – (aim for the. . ., well, you know what to do).

slide-146
SLIDE 146

HAL

Hardware Abstraction Layer A better backronym would be Hardware Annotation Library. Huge crapload of unreadable and unmaintainable XML files. Officially deprecated! Though still in use by some Distros – (aim for the. . ., well, you know what to do).

slide-147
SLIDE 147

HAL

Hardware Abstraction Layer A better backronym would be Hardware Annotation Library. Huge crapload of unreadable and unmaintainable XML files. Officially deprecated! Though still in use by some Distros – (aim for the. . ., well, you know what to do).

slide-148
SLIDE 148

I don’t want all this crap

slide-149
SLIDE 149

In a organization’s network

central software distribution central configuration users have no privileges at all custom terminal access solutions (provide access to localy mounted media on remotely accessed machine) I, as an administrator, want the full control over my stuff.

slide-150
SLIDE 150

In a organization’s network

central software distribution central configuration users have no privileges at all custom terminal access solutions (provide access to localy mounted media on remotely accessed machine) I, as an administrator, want the full control over my stuff.

slide-151
SLIDE 151

You’ll end up creating your own distribution – or use Gentoo

Customly compiled Desktops Alternate package sources, patched packages Also requires maintaining a custom configuration system

slide-152
SLIDE 152

See your carefully crafted configurations break

So we were testing Ubuntu 9.04. . . University maintains a central authentication database for all students and employees

User Database accessed by LDAP/Active Directory Kerberos-5 for authentication

A carefully maintained set of Kerberos-5, LDAP nsswitch and PAM config files is provided Some of our older maintenance tools require SSH root access by public key, and only if from our IP range – yes, we know, you don’t do this, but this is like using Duct Tape, it somehow works and then lasts. The system passes all automated security tests.

slide-153
SLIDE 153

See your carefully crafted configurations break

So we were testing Ubuntu 9.04. . . University maintains a central authentication database for all students and employees

User Database accessed by LDAP/Active Directory Kerberos-5 for authentication

A carefully maintained set of Kerberos-5, LDAP nsswitch and PAM config files is provided Some of our older maintenance tools require SSH root access by public key, and only if from our IP range – yes, we know, you don’t do this, but this is like using Duct Tape, it somehow works and then lasts. The system passes all automated security tests.

slide-154
SLIDE 154

See your carefully crafted configurations break

So we were testing Ubuntu 9.04. . . University maintains a central authentication database for all students and employees

User Database accessed by LDAP/Active Directory Kerberos-5 for authentication

A carefully maintained set of Kerberos-5, LDAP nsswitch and PAM config files is provided Some of our older maintenance tools require SSH root access by public key, and only if from our IP range – yes, we know, you don’t do this, but this is like using Duct Tape, it somehow works and then lasts. The system passes all automated security tests.

slide-155
SLIDE 155

See your carefully crafted configurations break

So we were testing Ubuntu 9.04. . . University maintains a central authentication database for all students and employees

User Database accessed by LDAP/Active Directory Kerberos-5 for authentication

A carefully maintained set of Kerberos-5, LDAP nsswitch and PAM config files is provided Some of our older maintenance tools require SSH root access by public key, and only if from our IP range – yes, we know, you don’t do this, but this is like using Duct Tape, it somehow works and then lasts. The system passes all automated security tests.

slide-156
SLIDE 156

So what’s the problem, then?

Well, ConsoleKit + PolicyKit have a set of own PAM rules installed These rules plus those of our Kerberos-5 auth plus the config for root-SSH were a bit unlucky ⇒root could SSH into those boxes without requiring a password, or a public key, but only if not from our IP range. Only good thing was: root doesn’t get Kerberos tokens in

  • ur system, so no harm outside those test machines.
slide-157
SLIDE 157

So what’s the problem, then?

Well, ConsoleKit + PolicyKit have a set of own PAM rules installed These rules plus those of our Kerberos-5 auth plus the config for root-SSH were a bit unlucky ⇒root could SSH into those boxes without requiring a password, or a public key, but only if not from our IP range. Only good thing was: root doesn’t get Kerberos tokens in

  • ur system, so no harm outside those test machines.
slide-158
SLIDE 158

So what’s the problem, then?

Well, ConsoleKit + PolicyKit have a set of own PAM rules installed These rules plus those of our Kerberos-5 auth plus the config for root-SSH were a bit unlucky ⇒root could SSH into those boxes without requiring a password, or a public key, but only if not from our IP range. Only good thing was: root doesn’t get Kerberos tokens in

  • ur system, so no harm outside those test machines.
slide-159
SLIDE 159

So what’s the problem, then?

Well, ConsoleKit + PolicyKit have a set of own PAM rules installed These rules plus those of our Kerberos-5 auth plus the config for root-SSH were a bit unlucky ⇒root could SSH into those boxes without requiring a password, or a public key, but only if not from our IP range. Only good thing was: root doesn’t get Kerberos tokens in

  • ur system, so no harm outside those test machines.
slide-160
SLIDE 160

Morale

Yes, it was a configuration error. But to set proper configurations one needs good documentation – for sysadmins. Distributions don’t properly document their inner workings. This must change. Those convoluted interdependencies of current desktop systems do no good.

slide-161
SLIDE 161

Morale

Yes, it was a configuration error. But to set proper configurations one needs good documentation – for sysadmins. Distributions don’t properly document their inner workings. This must change. Those convoluted interdependencies of current desktop systems do no good.

slide-162
SLIDE 162

Morale

Yes, it was a configuration error. But to set proper configurations one needs good documentation – for sysadmins. Distributions don’t properly document their inner workings. This must change. Those convoluted interdependencies of current desktop systems do no good.

slide-163
SLIDE 163

Morale

Yes, it was a configuration error. But to set proper configurations one needs good documentation – for sysadmins. Distributions don’t properly document their inner workings. This must change. Those convoluted interdependencies of current desktop systems do no good.

slide-164
SLIDE 164

We’ve seen only the tip of the iceberg so far. There’s a lot more to consider: Modern Unix Desktops depend on a number

  • f system level services

Some of these services aim at replacing core functionality, not even related to desktops

systemd (replaces SysV init, upstart, the like) RealtimeKit (a whole story of its own).

The more direct dependencies are created down to the system level, the harder it get’s to install alternatives there. Eventually the whole development process may be only about fixing issues – probably by adding complexity instead of removing – and come to a standstill.

slide-165
SLIDE 165

We’ve seen only the tip of the iceberg so far. There’s a lot more to consider: Modern Unix Desktops depend on a number

  • f system level services

Some of these services aim at replacing core functionality, not even related to desktops

systemd (replaces SysV init, upstart, the like) RealtimeKit (a whole story of its own).

The more direct dependencies are created down to the system level, the harder it get’s to install alternatives there. Eventually the whole development process may be only about fixing issues – probably by adding complexity instead of removing – and come to a standstill.

slide-166
SLIDE 166

Large, complicated set of immutable dependencies =

We’re getting locked in!

slide-167
SLIDE 167

Conclusion

slide-168
SLIDE 168

Conclusion

Fallacies of contemporary desktop development:

Errection of huge and complex structures Features given more weight than simplicity and stability Problems oftenly not properly identified Problems tackled by throwing even more code at them, instead of fixing proper cause.

slide-169
SLIDE 169

Quotes of famous people

Simplicity is the highest form of sophistication. – unattributed (Leonardo da Vinci?) Complexity has nothing to do with intelligence, simplicity does. – Larry Bossidy Make things as simple as possible – but not simpler. – Albert Einstein Those who don’t understand Unix are doomed to reinvent it, poorly. – Henry Spencer