aboutsummaryrefslogtreecommitdiff
path: root/sway/main.c
AgeCommit message (Collapse)Author
2018-07-09Update for swaywm/wlroots#1126emersion
2018-07-05pango/cairo: set default font map to NULL to free itDominique Martinet
2018-07-04ipc-server: add display destroy listener and remove ipc_terminateDominique Martinet
wl_event_source_remove() is illegal after display has been destroyed, so just destroy everything when we still can. ==20392==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000001240 at pc 0x00000048e86e bp 0x7ffe4b557e00 sp 0x7ffe4b557df0 READ of size 8 at 0x607000001240 thread T0 #0 0x48e86d in wl_list_insert ../common/list.c:149 #1 0x7fdf673d4d7d in wl_event_source_remove src/event-loop.c:487 #2 0x41b742 in ipc_terminate ../sway/ipc-server.c:94 #3 0x40b1ad in main ../sway/main.c:440 #4 0x7fdf6664c18a in __libc_start_main ../csu/libc-start.c:308 #5 0x409359 in _start (/opt/wayland/bin/sway+0x409359) 0x607000001240 is located 48 bytes inside of 72-byte region [0x607000001210,0x607000001258) freed by thread T0 here: #0 0x7fdf692c4880 in __interceptor_free (/lib64/libasan.so.5+0xee880) #1 0x7fdf673d371a in wl_display_destroy src/wayland-server.c:1097 previously allocated by thread T0 here: #0 0x7fdf692c4c48 in malloc (/lib64/libasan.so.5+0xeec48) #1 0x7fdf673d4d9e in wl_event_loop_create src/event-loop.c:522 #2 0x40acb2 in main ../sway/main.c:363 #3 0x7fdf6664c18a in __libc_start_main ../csu/libc-start.c:308
2018-07-04startup: move setenv WAYLAND_DISPLAY before config execsDominique Martinet
We would previously run all config commands without the environment, which would appear to work as our socket name is the default one, but wayland clients would start up in the wrong sway session. (This explains why 'sometimes' my swayidle processes wouldn't die with sway, as they weren't listening to the correct socket)
2018-07-02log_kernel: s/fclose/pclose/ (for popen'd FILE)Dominique Martinet
With recent glibc the functions are strictly identical, but this might not be true for all libc implementations Found through static analysis.
2018-06-19Perform (partial) server initialization before dropping privileges.Tobias Blass
Some operations during backend creation (e.g. becoming DRM master) require CAP_SYS_ADMIN privileges. At this point, sway has dropped them already, though. This patch splits the privileged part of server_init into its own function and calls it before dropping its privileges. This fixes the bug with minimal security implications.
2018-06-05Remove suspicious unconditional returnTobias Blass
This return effectively disables the log_kernel function
2018-05-16sway: run commands without waiting for XwaylandDominique Martinet
Xwayland is lazy now, there is no need to wait at all
2018-04-06Add debug tree viewDrew DeVault
2018-03-31temporarily add LD_LIBRARY_PATH stuffTony Crisci
2018-03-29Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"Tony Crisci
This reverts commit 472e81f35d689d67cda241acafda91c688d61046, reversing changes made to 6b7841b11ff4cd35f54d69dc92029855893e5ce0.
2018-03-29Revert "Refactor tree"Drew DeVault
2018-03-29rename layout initTony Crisci
2018-03-29move tree includes to their own directoryTony Crisci
2018-01-05fix typos in comments/messages; add shutting down messageDominique Martinet
2017-12-31Consolidate WLR and Sway loggingCalvin Lee
See #1390
2017-12-16Merge branch 'wlroots' into feature/inputTony Crisci
2017-12-15xkb configTony Crisci
2017-12-09working xcursorTony Crisci
2017-12-06Add output configemersion
2017-12-05Add minimal config subsystememersion
2017-12-02log env after ipc initTony Crisci
2017-11-28remove nvidia support claimTony Crisci
2017-11-22Wire up IPC serverDrew DeVault
2017-11-19Add outputs to the treeDrew DeVault
2017-11-18Move everything to sway/old/Drew DeVault
2017-11-11Initialize outputs from backend and add to treeDrew DeVault
2017-11-11Fire up the wlroots backend and run the event loopDrew DeVault
2017-10-24nvidia: Validate the nvidia_drm module optionsDan Robertson
When the proprietary nvidia driver is used, ensure the modeset option is set instead of checking /proc/cmdline for nvidia-drm.modeset=1.
2017-08-14Check for Raspberry Piazarus
2017-06-06FreeBSD fixesjohalun
Increase _POSIX_SOURCE value where needed. Increase _XOPEN_SOURCE value where needed. Conditionally link to libcap (only on Linux). Possibly some trailing whitespace fixes (automatic).
2017-05-11Terminate when both suid bit and filecaps are setMykyta Holubakha
2017-05-11Initialise logging earlierMykyta Holubakha
2017-04-26Add -DVERSION flag for release version numbersSebastian Noack
2017-04-12Implement more thourough nvidia config checkDrew DeVault
2017-04-12Downgrade nvidia proprietary driver warningDrew DeVault
2017-04-07Add libcap check to CMakeJerziKaminsky
- Moved ``<sys/capability.h>`` include inside `__linux__` guard, because all uses are similarly guarded. - <sys/capability.h> is part of an optional devel package, at least in fedora. CMake now explicitly checks that libcap devel files are available. - Added libcap to the list of install packages in .travis.yml, to make the dependency explicit. travis-ci installs the package by default, which is why this hasn't surfaced previously.
2017-03-10UnGNUify the codebaseDrew DeVault
2017-02-23Move env logging to earlier than wlc_initDrew DeVault
2017-02-20Read configs from /etc/sway/security.d/*Drew DeVault
2017-01-16Unset LD_LIBRARY_PATH, unless specifiedMykyta Holubakha
2017-01-12Log capability droppingMykyta Holubakha
2017-01-12Keep CAP_SYS_PTRACE with suid binaryMykyta Holubakha
2016-12-17Change how security config is loadedDrew DeVault
2016-12-15Handle malloc failures from read_lineDrew DeVault
2016-12-09Fix build on FreeBSDGreg V
- Make sure CMake always finds absolute paths for Cairo, Pango and GdkPixbuf - Add forgotten json-c include path to swaymsg/CMakeLists.txt - Disable -Werror because of assert warnings - Add correct /proc/pid/file path for FreeBSD - Use libepoll-shim on FreeBSD - Only use Linux capabilities on, well, Linux
2016-12-04Decrement expected_lenDrew DeVault
2016-12-04Drop restart command from sanity checkDrew DeVault
Since we don't actually have one of those
2016-12-02Check for CAP_SYS_PTRACEDrew DeVault
2016-12-02Deal with LD_LIBRARY_PATHDrew DeVault