├── CONTRIBUTING.md ├── COPYING ├── README.md ├── auto-generated-man-pages └── sandbox-app-launcher.8 ├── changelog.upstream ├── debian ├── changelog ├── control ├── copyright ├── make-helper-overrides.bsh ├── rules ├── sandbox-app-launcher.install ├── sandbox-app-launcher.links ├── sandbox-app-launcher.postinst ├── sandbox-app-launcher.postrm ├── source │ ├── format │ └── lintian-overrides └── watch ├── etc ├── apparmor.d │ ├── abstractions │ │ └── sandbox-app-launcher │ └── sandbox-app-launcher └── sandbox-app-launcher │ ├── chromium.conf │ ├── firefox.conf │ ├── hexchat.conf │ ├── keepassxc.conf │ ├── libreoffice.conf │ ├── mousepad.conf │ ├── onionshare.conf │ ├── qtox.conf │ ├── ristretto.conf │ ├── thunderbird.conf │ ├── torbrowser.conf │ ├── vlc.conf │ └── xpdf.conf ├── man └── sandbox-app-launcher.8.ronn ├── tests ├── W^X │ ├── w^x-mmap.c │ ├── w^x-mprotect.c │ └── w^x-shmat.c ├── exec-elf.sh └── tiocsti.c └── usr ├── bin └── sandbox-app-launcher └── share └── sandbox-app-launcher ├── autogen-seccomp ├── bwrap-wrapper ├── machine-id ├── seccomp-whitelist ├── seccomp-whitelist-wx └── wrapper-script /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Conditions for Contributions to Whonix 2 | 3 | By contributing to Whonix, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent. 4 | 5 | https://www.whonix.org/wiki/Privacy_Policy 6 | 7 | https://www.whonix.org/wiki/Cookie_Policy 8 | 9 | https://www.whonix.org/wiki/Terms_of_Service 10 | 11 | https://www.whonix.org/wiki/E-Sign_Consent 12 | 13 | Conditions for Contributions to Whonix are not part of Whonix's license. 14 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | 3 | Files: * 4 | Copyright: 2012 - 2025 ENCRYPTED SUPPORT LLC 5 | License: AGPL-3+ 6 | 7 | License: AGPL-3+ 8 | GNU AFFERO GENERAL PUBLIC LICENSE 9 | Version 3, 19 November 2007 10 | . 11 | Copyright (C) 2007 Free Software Foundation, Inc. 12 | Everyone is permitted to copy and distribute verbatim copies 13 | of this license document, but changing it is not allowed. 14 | . 15 | Preamble 16 | . 17 | The GNU Affero General Public License is a free, copyleft license for 18 | software and other kinds of works, specifically designed to ensure 19 | cooperation with the community in the case of network server software. 20 | . 21 | The licenses for most software and other practical works are designed 22 | to take away your freedom to share and change the works. By contrast, 23 | our General Public Licenses are intended to guarantee your freedom to 24 | share and change all versions of a program--to make sure it remains free 25 | software for all its users. 26 | . 27 | When we speak of free software, we are referring to freedom, not 28 | price. Our General Public Licenses are designed to make sure that you 29 | have the freedom to distribute copies of free software (and charge for 30 | them if you wish), that you receive source code or can get it if you 31 | want it, that you can change the software or use pieces of it in new 32 | free programs, and that you know you can do these things. 33 | . 34 | Developers that use our General Public Licenses protect your rights 35 | with two steps: (1) assert copyright on the software, and (2) offer 36 | you this License which gives you legal permission to copy, distribute 37 | and/or modify the software. 38 | . 39 | A secondary benefit of defending all users' freedom is that 40 | improvements made in alternate versions of the program, if they 41 | receive widespread use, become available for other developers to 42 | incorporate. Many developers of free software are heartened and 43 | encouraged by the resulting cooperation. However, in the case of 44 | software used on network servers, this result may fail to come about. 45 | The GNU General Public License permits making a modified version and 46 | letting the public access it on a server without ever releasing its 47 | source code to the public. 48 | . 49 | The GNU Affero General Public License is designed specifically to 50 | ensure that, in such cases, the modified source code becomes available 51 | to the community. It requires the operator of a network server to 52 | provide the source code of the modified version running there to the 53 | users of that server. Therefore, public use of a modified version, on 54 | a publicly accessible server, gives the public access to the source 55 | code of the modified version. 56 | . 57 | An older license, called the Affero General Public License and 58 | published by Affero, was designed to accomplish similar goals. This is 59 | a different license, not a version of the Affero GPL, but Affero has 60 | released a new version of the Affero GPL which permits relicensing under 61 | this license. 62 | . 63 | The precise terms and conditions for copying, distribution and 64 | modification follow. 65 | . 66 | TERMS AND CONDITIONS 67 | . 68 | 0. Definitions. 69 | . 70 | "This License" refers to version 3 of the GNU Affero General Public License. 71 | . 72 | "Copyright" also means copyright-like laws that apply to other kinds of 73 | works, such as semiconductor masks. 74 | . 75 | "The Program" refers to any copyrightable work licensed under this 76 | License. Each licensee is addressed as "you". "Licensees" and 77 | "recipients" may be individuals or organizations. 78 | . 79 | To "modify" a work means to copy from or adapt all or part of the work 80 | in a fashion requiring copyright permission, other than the making of an 81 | exact copy. The resulting work is called a "modified version" of the 82 | earlier work or a work "based on" the earlier work. 83 | . 84 | A "covered work" means either the unmodified Program or a work based 85 | on the Program. 86 | . 87 | To "propagate" a work means to do anything with it that, without 88 | permission, would make you directly or secondarily liable for 89 | infringement under applicable copyright law, except executing it on a 90 | computer or modifying a private copy. Propagation includes copying, 91 | distribution (with or without modification), making available to the 92 | public, and in some countries other activities as well. 93 | . 94 | To "convey" a work means any kind of propagation that enables other 95 | parties to make or receive copies. Mere interaction with a user through 96 | a computer network, with no transfer of a copy, is not conveying. 97 | . 98 | An interactive user interface displays "Appropriate Legal Notices" 99 | to the extent that it includes a convenient and prominently visible 100 | feature that (1) displays an appropriate copyright notice, and (2) 101 | tells the user that there is no warranty for the work (except to the 102 | extent that warranties are provided), that licensees may convey the 103 | work under this License, and how to view a copy of this License. If 104 | the interface presents a list of user commands or options, such as a 105 | menu, a prominent item in the list meets this criterion. 106 | . 107 | 1. Source Code. 108 | . 109 | The "source code" for a work means the preferred form of the work 110 | for making modifications to it. "Object code" means any non-source 111 | form of a work. 112 | . 113 | A "Standard Interface" means an interface that either is an official 114 | standard defined by a recognized standards body, or, in the case of 115 | interfaces specified for a particular programming language, one that 116 | is widely used among developers working in that language. 117 | . 118 | The "System Libraries" of an executable work include anything, other 119 | than the work as a whole, that (a) is included in the normal form of 120 | packaging a Major Component, but which is not part of that Major 121 | Component, and (b) serves only to enable use of the work with that 122 | Major Component, or to implement a Standard Interface for which an 123 | implementation is available to the public in source code form. A 124 | "Major Component", in this context, means a major essential component 125 | (kernel, window system, and so on) of the specific operating system 126 | (if any) on which the executable work runs, or a compiler used to 127 | produce the work, or an object code interpreter used to run it. 128 | . 129 | The "Corresponding Source" for a work in object code form means all 130 | the source code needed to generate, install, and (for an executable 131 | work) run the object code and to modify the work, including scripts to 132 | control those activities. However, it does not include the work's 133 | System Libraries, or general-purpose tools or generally available free 134 | programs which are used unmodified in performing those activities but 135 | which are not part of the work. For example, Corresponding Source 136 | includes interface definition files associated with source files for 137 | the work, and the source code for shared libraries and dynamically 138 | linked subprograms that the work is specifically designed to require, 139 | such as by intimate data communication or control flow between those 140 | subprograms and other parts of the work. 141 | . 142 | The Corresponding Source need not include anything that users 143 | can regenerate automatically from other parts of the Corresponding 144 | Source. 145 | . 146 | The Corresponding Source for a work in source code form is that 147 | same work. 148 | . 149 | 2. Basic Permissions. 150 | . 151 | All rights granted under this License are granted for the term of 152 | copyright on the Program, and are irrevocable provided the stated 153 | conditions are met. This License explicitly affirms your unlimited 154 | permission to run the unmodified Program. The output from running a 155 | covered work is covered by this License only if the output, given its 156 | content, constitutes a covered work. This License acknowledges your 157 | rights of fair use or other equivalent, as provided by copyright law. 158 | . 159 | You may make, run and propagate covered works that you do not 160 | convey, without conditions so long as your license otherwise remains 161 | in force. You may convey covered works to others for the sole purpose 162 | of having them make modifications exclusively for you, or provide you 163 | with facilities for running those works, provided that you comply with 164 | the terms of this License in conveying all material for which you do 165 | not control copyright. Those thus making or running the covered works 166 | for you must do so exclusively on your behalf, under your direction 167 | and control, on terms that prohibit them from making any copies of 168 | your copyrighted material outside their relationship with you. 169 | . 170 | Conveying under any other circumstances is permitted solely under 171 | the conditions stated below. Sublicensing is not allowed; section 10 172 | makes it unnecessary. 173 | . 174 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 175 | . 176 | No covered work shall be deemed part of an effective technological 177 | measure under any applicable law fulfilling obligations under article 178 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 179 | similar laws prohibiting or restricting circumvention of such 180 | measures. 181 | . 182 | When you convey a covered work, you waive any legal power to forbid 183 | circumvention of technological measures to the extent such circumvention 184 | is effected by exercising rights under this License with respect to 185 | the covered work, and you disclaim any intention to limit operation or 186 | modification of the work as a means of enforcing, against the work's 187 | users, your or third parties' legal rights to forbid circumvention of 188 | technological measures. 189 | . 190 | 4. Conveying Verbatim Copies. 191 | . 192 | You may convey verbatim copies of the Program's source code as you 193 | receive it, in any medium, provided that you conspicuously and 194 | appropriately publish on each copy an appropriate copyright notice; 195 | keep intact all notices stating that this License and any 196 | non-permissive terms added in accord with section 7 apply to the code; 197 | keep intact all notices of the absence of any warranty; and give all 198 | recipients a copy of this License along with the Program. 199 | . 200 | You may charge any price or no price for each copy that you convey, 201 | and you may offer support or warranty protection for a fee. 202 | . 203 | 5. Conveying Modified Source Versions. 204 | . 205 | You may convey a work based on the Program, or the modifications to 206 | produce it from the Program, in the form of source code under the 207 | terms of section 4, provided that you also meet all of these conditions: 208 | . 209 | a) The work must carry prominent notices stating that you modified 210 | it, and giving a relevant date. 211 | . 212 | b) The work must carry prominent notices stating that it is 213 | released under this License and any conditions added under section 214 | 7. This requirement modifies the requirement in section 4 to 215 | "keep intact all notices". 216 | . 217 | c) You must license the entire work, as a whole, under this 218 | License to anyone who comes into possession of a copy. This 219 | License will therefore apply, along with any applicable section 7 220 | additional terms, to the whole of the work, and all its parts, 221 | regardless of how they are packaged. This License gives no 222 | permission to license the work in any other way, but it does not 223 | invalidate such permission if you have separately received it. 224 | . 225 | d) If the work has interactive user interfaces, each must display 226 | Appropriate Legal Notices; however, if the Program has interactive 227 | interfaces that do not display Appropriate Legal Notices, your 228 | work need not make them do so. 229 | . 230 | A compilation of a covered work with other separate and independent 231 | works, which are not by their nature extensions of the covered work, 232 | and which are not combined with it such as to form a larger program, 233 | in or on a volume of a storage or distribution medium, is called an 234 | "aggregate" if the compilation and its resulting copyright are not 235 | used to limit the access or legal rights of the compilation's users 236 | beyond what the individual works permit. Inclusion of a covered work 237 | in an aggregate does not cause this License to apply to the other 238 | parts of the aggregate. 239 | . 240 | 6. Conveying Non-Source Forms. 241 | . 242 | You may convey a covered work in object code form under the terms 243 | of sections 4 and 5, provided that you also convey the 244 | machine-readable Corresponding Source under the terms of this License, 245 | in one of these ways: 246 | . 247 | a) Convey the object code in, or embodied in, a physical product 248 | (including a physical distribution medium), accompanied by the 249 | Corresponding Source fixed on a durable physical medium 250 | customarily used for software interchange. 251 | . 252 | b) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by a 254 | written offer, valid for at least three years and valid for as 255 | long as you offer spare parts or customer support for that product 256 | model, to give anyone who possesses the object code either (1) a 257 | copy of the Corresponding Source for all the software in the 258 | product that is covered by this License, on a durable physical 259 | medium customarily used for software interchange, for a price no 260 | more than your reasonable cost of physically performing this 261 | conveying of source, or (2) access to copy the 262 | Corresponding Source from a network server at no charge. 263 | . 264 | c) Convey individual copies of the object code with a copy of the 265 | written offer to provide the Corresponding Source. This 266 | alternative is allowed only occasionally and noncommercially, and 267 | only if you received the object code with such an offer, in accord 268 | with subsection 6b. 269 | . 270 | d) Convey the object code by offering access from a designated 271 | place (gratis or for a charge), and offer equivalent access to the 272 | Corresponding Source in the same way through the same place at no 273 | further charge. You need not require recipients to copy the 274 | Corresponding Source along with the object code. If the place to 275 | copy the object code is a network server, the Corresponding Source 276 | may be on a different server (operated by you or a third party) 277 | that supports equivalent copying facilities, provided you maintain 278 | clear directions next to the object code saying where to find the 279 | Corresponding Source. Regardless of what server hosts the 280 | Corresponding Source, you remain obligated to ensure that it is 281 | available for as long as needed to satisfy these requirements. 282 | . 283 | e) Convey the object code using peer-to-peer transmission, provided 284 | you inform other peers where the object code and Corresponding 285 | Source of the work are being offered to the general public at no 286 | charge under subsection 6d. 287 | . 288 | A separable portion of the object code, whose source code is excluded 289 | from the Corresponding Source as a System Library, need not be 290 | included in conveying the object code work. 291 | . 292 | A "User Product" is either (1) a "consumer product", which means any 293 | tangible personal property which is normally used for personal, family, 294 | or household purposes, or (2) anything designed or sold for incorporation 295 | into a dwelling. In determining whether a product is a consumer product, 296 | doubtful cases shall be resolved in favor of coverage. For a particular 297 | product received by a particular user, "normally used" refers to a 298 | typical or common use of that class of product, regardless of the status 299 | of the particular user or of the way in which the particular user 300 | actually uses, or expects or is expected to use, the product. A product 301 | is a consumer product regardless of whether the product has substantial 302 | commercial, industrial or non-consumer uses, unless such uses represent 303 | the only significant mode of use of the product. 304 | . 305 | "Installation Information" for a User Product means any methods, 306 | procedures, authorization keys, or other information required to install 307 | and execute modified versions of a covered work in that User Product from 308 | a modified version of its Corresponding Source. The information must 309 | suffice to ensure that the continued functioning of the modified object 310 | code is in no case prevented or interfered with solely because 311 | modification has been made. 312 | . 313 | If you convey an object code work under this section in, or with, or 314 | specifically for use in, a User Product, and the conveying occurs as 315 | part of a transaction in which the right of possession and use of the 316 | User Product is transferred to the recipient in perpetuity or for a 317 | fixed term (regardless of how the transaction is characterized), the 318 | Corresponding Source conveyed under this section must be accompanied 319 | by the Installation Information. But this requirement does not apply 320 | if neither you nor any third party retains the ability to install 321 | modified object code on the User Product (for example, the work has 322 | been installed in ROM). 323 | . 324 | The requirement to provide Installation Information does not include a 325 | requirement to continue to provide support service, warranty, or updates 326 | for a work that has been modified or installed by the recipient, or for 327 | the User Product in which it has been modified or installed. Access to a 328 | network may be denied when the modification itself materially and 329 | adversely affects the operation of the network or violates the rules and 330 | protocols for communication across the network. 331 | . 332 | Corresponding Source conveyed, and Installation Information provided, 333 | in accord with this section must be in a format that is publicly 334 | documented (and with an implementation available to the public in 335 | source code form), and must require no special password or key for 336 | unpacking, reading or copying. 337 | . 338 | 7. Additional Terms. 339 | . 340 | "Additional permissions" are terms that supplement the terms of this 341 | License by making exceptions from one or more of its conditions. 342 | Additional permissions that are applicable to the entire Program shall 343 | be treated as though they were included in this License, to the extent 344 | that they are valid under applicable law. If additional permissions 345 | apply only to part of the Program, that part may be used separately 346 | under those permissions, but the entire Program remains governed by 347 | this License without regard to the additional permissions. 348 | . 349 | When you convey a copy of a covered work, you may at your option 350 | remove any additional permissions from that copy, or from any part of 351 | it. (Additional permissions may be written to require their own 352 | removal in certain cases when you modify the work.) You may place 353 | additional permissions on material, added by you to a covered work, 354 | for which you have or can give appropriate copyright permission. 355 | . 356 | Notwithstanding any other provision of this License, for material you 357 | add to a covered work, you may (if authorized by the copyright holders of 358 | that material) supplement the terms of this License with terms: 359 | . 360 | a) Disclaiming warranty or limiting liability differently from the 361 | terms of sections 15 and 16 of this License; or 362 | . 363 | b) Requiring preservation of specified reasonable legal notices or 364 | author attributions in that material or in the Appropriate Legal 365 | Notices displayed by works containing it; or 366 | . 367 | c) Prohibiting misrepresentation of the origin of that material, or 368 | requiring that modified versions of such material be marked in 369 | reasonable ways as different from the original version; or 370 | . 371 | d) Limiting the use for publicity purposes of names of licensors or 372 | authors of the material; or 373 | . 374 | e) Declining to grant rights under trademark law for use of some 375 | trade names, trademarks, or service marks; or 376 | . 377 | f) Requiring indemnification of licensors and authors of that 378 | material by anyone who conveys the material (or modified versions of 379 | it) with contractual assumptions of liability to the recipient, for 380 | any liability that these contractual assumptions directly impose on 381 | those licensors and authors. 382 | . 383 | All other non-permissive additional terms are considered "further 384 | restrictions" within the meaning of section 10. If the Program as you 385 | received it, or any part of it, contains a notice stating that it is 386 | governed by this License along with a term that is a further 387 | restriction, you may remove that term. If a license document contains 388 | a further restriction but permits relicensing or conveying under this 389 | License, you may add to a covered work material governed by the terms 390 | of that license document, provided that the further restriction does 391 | not survive such relicensing or conveying. 392 | . 393 | If you add terms to a covered work in accord with this section, you 394 | must place, in the relevant source files, a statement of the 395 | additional terms that apply to those files, or a notice indicating 396 | where to find the applicable terms. 397 | . 398 | Additional terms, permissive or non-permissive, may be stated in the 399 | form of a separately written license, or stated as exceptions; 400 | the above requirements apply either way. 401 | . 402 | 8. Termination. 403 | . 404 | You may not propagate or modify a covered work except as expressly 405 | provided under this License. Any attempt otherwise to propagate or 406 | modify it is void, and will automatically terminate your rights under 407 | this License (including any patent licenses granted under the third 408 | paragraph of section 11). 409 | . 410 | However, if you cease all violation of this License, then your 411 | license from a particular copyright holder is reinstated (a) 412 | provisionally, unless and until the copyright holder explicitly and 413 | finally terminates your license, and (b) permanently, if the copyright 414 | holder fails to notify you of the violation by some reasonable means 415 | prior to 60 days after the cessation. 416 | . 417 | Moreover, your license from a particular copyright holder is 418 | reinstated permanently if the copyright holder notifies you of the 419 | violation by some reasonable means, this is the first time you have 420 | received notice of violation of this License (for any work) from that 421 | copyright holder, and you cure the violation prior to 30 days after 422 | your receipt of the notice. 423 | . 424 | Termination of your rights under this section does not terminate the 425 | licenses of parties who have received copies or rights from you under 426 | this License. If your rights have been terminated and not permanently 427 | reinstated, you do not qualify to receive new licenses for the same 428 | material under section 10. 429 | . 430 | 9. Acceptance Not Required for Having Copies. 431 | . 432 | You are not required to accept this License in order to receive or 433 | run a copy of the Program. Ancillary propagation of a covered work 434 | occurring solely as a consequence of using peer-to-peer transmission 435 | to receive a copy likewise does not require acceptance. However, 436 | nothing other than this License grants you permission to propagate or 437 | modify any covered work. These actions infringe copyright if you do 438 | not accept this License. Therefore, by modifying or propagating a 439 | covered work, you indicate your acceptance of this License to do so. 440 | . 441 | 10. Automatic Licensing of Downstream Recipients. 442 | . 443 | Each time you convey a covered work, the recipient automatically 444 | receives a license from the original licensors, to run, modify and 445 | propagate that work, subject to this License. You are not responsible 446 | for enforcing compliance by third parties with this License. 447 | . 448 | An "entity transaction" is a transaction transferring control of an 449 | organization, or substantially all assets of one, or subdividing an 450 | organization, or merging organizations. If propagation of a covered 451 | work results from an entity transaction, each party to that 452 | transaction who receives a copy of the work also receives whatever 453 | licenses to the work the party's predecessor in interest had or could 454 | give under the previous paragraph, plus a right to possession of the 455 | Corresponding Source of the work from the predecessor in interest, if 456 | the predecessor has it or can get it with reasonable efforts. 457 | . 458 | You may not impose any further restrictions on the exercise of the 459 | rights granted or affirmed under this License. For example, you may 460 | not impose a license fee, royalty, or other charge for exercise of 461 | rights granted under this License, and you may not initiate litigation 462 | (including a cross-claim or counterclaim in a lawsuit) alleging that 463 | any patent claim is infringed by making, using, selling, offering for 464 | sale, or importing the Program or any portion of it. 465 | . 466 | 11. Patents. 467 | . 468 | A "contributor" is a copyright holder who authorizes use under this 469 | License of the Program or a work on which the Program is based. The 470 | work thus licensed is called the contributor's "contributor version". 471 | . 472 | A contributor's "essential patent claims" are all patent claims 473 | owned or controlled by the contributor, whether already acquired or 474 | hereafter acquired, that would be infringed by some manner, permitted 475 | by this License, of making, using, or selling its contributor version, 476 | but do not include claims that would be infringed only as a 477 | consequence of further modification of the contributor version. For 478 | purposes of this definition, "control" includes the right to grant 479 | patent sublicenses in a manner consistent with the requirements of 480 | this License. 481 | . 482 | Each contributor grants you a non-exclusive, worldwide, royalty-free 483 | patent license under the contributor's essential patent claims, to 484 | make, use, sell, offer for sale, import and otherwise run, modify and 485 | propagate the contents of its contributor version. 486 | . 487 | In the following three paragraphs, a "patent license" is any express 488 | agreement or commitment, however denominated, not to enforce a patent 489 | (such as an express permission to practice a patent or covenant not to 490 | sue for patent infringement). To "grant" such a patent license to a 491 | party means to make such an agreement or commitment not to enforce a 492 | patent against the party. 493 | . 494 | If you convey a covered work, knowingly relying on a patent license, 495 | and the Corresponding Source of the work is not available for anyone 496 | to copy, free of charge and under the terms of this License, through a 497 | publicly available network server or other readily accessible means, 498 | then you must either (1) cause the Corresponding Source to be so 499 | available, or (2) arrange to deprive yourself of the benefit of the 500 | patent license for this particular work, or (3) arrange, in a manner 501 | consistent with the requirements of this License, to extend the patent 502 | license to downstream recipients. "Knowingly relying" means you have 503 | actual knowledge that, but for the patent license, your conveying the 504 | covered work in a country, or your recipient's use of the covered work 505 | in a country, would infringe one or more identifiable patents in that 506 | country that you have reason to believe are valid. 507 | . 508 | If, pursuant to or in connection with a single transaction or 509 | arrangement, you convey, or propagate by procuring conveyance of, a 510 | covered work, and grant a patent license to some of the parties 511 | receiving the covered work authorizing them to use, propagate, modify 512 | or convey a specific copy of the covered work, then the patent license 513 | you grant is automatically extended to all recipients of the covered 514 | work and works based on it. 515 | . 516 | A patent license is "discriminatory" if it does not include within 517 | the scope of its coverage, prohibits the exercise of, or is 518 | conditioned on the non-exercise of one or more of the rights that are 519 | specifically granted under this License. You may not convey a covered 520 | work if you are a party to an arrangement with a third party that is 521 | in the business of distributing software, under which you make payment 522 | to the third party based on the extent of your activity of conveying 523 | the work, and under which the third party grants, to any of the 524 | parties who would receive the covered work from you, a discriminatory 525 | patent license (a) in connection with copies of the covered work 526 | conveyed by you (or copies made from those copies), or (b) primarily 527 | for and in connection with specific products or compilations that 528 | contain the covered work, unless you entered into that arrangement, 529 | or that patent license was granted, prior to 28 March 2007. 530 | . 531 | Nothing in this License shall be construed as excluding or limiting 532 | any implied license or other defenses to infringement that may 533 | otherwise be available to you under applicable patent law. 534 | . 535 | 12. No Surrender of Others' Freedom. 536 | . 537 | If conditions are imposed on you (whether by court order, agreement or 538 | otherwise) that contradict the conditions of this License, they do not 539 | excuse you from the conditions of this License. If you cannot convey a 540 | covered work so as to satisfy simultaneously your obligations under this 541 | License and any other pertinent obligations, then as a consequence you may 542 | not convey it at all. For example, if you agree to terms that obligate you 543 | to collect a royalty for further conveying from those to whom you convey 544 | the Program, the only way you could satisfy both those terms and this 545 | License would be to refrain entirely from conveying the Program. 546 | . 547 | 13. Remote Network Interaction; Use with the GNU General Public License. 548 | . 549 | Notwithstanding any other provision of this License, if you modify the 550 | Program, your modified version must prominently offer all users 551 | interacting with it remotely through a computer network (if your version 552 | supports such interaction) an opportunity to receive the Corresponding 553 | Source of your version by providing access to the Corresponding Source 554 | from a network server at no charge, through some standard or customary 555 | means of facilitating copying of software. This Corresponding Source 556 | shall include the Corresponding Source for any work covered by version 3 557 | of the GNU General Public License that is incorporated pursuant to the 558 | following paragraph. 559 | . 560 | Notwithstanding any other provision of this License, you have 561 | permission to link or combine any covered work with a work licensed 562 | under version 3 of the GNU General Public License into a single 563 | combined work, and to convey the resulting work. The terms of this 564 | License will continue to apply to the part which is the covered work, 565 | but the work with which it is combined will remain governed by version 566 | 3 of the GNU General Public License. 567 | . 568 | 14. Revised Versions of this License. 569 | . 570 | The Free Software Foundation may publish revised and/or new versions of 571 | the GNU Affero General Public License from time to time. Such new versions 572 | will be similar in spirit to the present version, but may differ in detail to 573 | address new problems or concerns. 574 | . 575 | Each version is given a distinguishing version number. If the 576 | Program specifies that a certain numbered version of the GNU Affero General 577 | Public License "or any later version" applies to it, you have the 578 | option of following the terms and conditions either of that numbered 579 | version or of any later version published by the Free Software 580 | Foundation. If the Program does not specify a version number of the 581 | GNU Affero General Public License, you may choose any version ever published 582 | by the Free Software Foundation. 583 | . 584 | If the Program specifies that a proxy can decide which future 585 | versions of the GNU Affero General Public License can be used, that proxy's 586 | public statement of acceptance of a version permanently authorizes you 587 | to choose that version for the Program. 588 | . 589 | Later license versions may give you additional or different 590 | permissions. However, no additional obligations are imposed on any 591 | author or copyright holder as a result of your choosing to follow a 592 | later version. 593 | . 594 | 15. Disclaimer of Warranty. 595 | . 596 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 597 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 598 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 599 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 600 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 601 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 602 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 603 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 604 | . 605 | 16. Limitation of Liability. 606 | . 607 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 608 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 609 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 610 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 611 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 612 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 613 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 614 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 615 | SUCH DAMAGES. 616 | . 617 | 17. Interpretation of Sections 15 and 16. 618 | . 619 | If the disclaimer of warranty and limitation of liability provided 620 | above cannot be given local legal effect according to their terms, 621 | reviewing courts shall apply local law that most closely approximates 622 | an absolute waiver of all civil liability in connection with the 623 | Program, unless a warranty or assumption of liability accompanies a 624 | copy of the Program in return for a fee. 625 | . 626 | END OF TERMS AND CONDITIONS 627 | . 628 | How to Apply These Terms to Your New Programs 629 | . 630 | If you develop a new program, and you want it to be of the greatest 631 | possible use to the public, the best way to achieve this is to make it 632 | free software which everyone can redistribute and change under these terms. 633 | . 634 | To do so, attach the following notices to the program. It is safest 635 | to attach them to the start of each source file to most effectively 636 | state the exclusion of warranty; and each file should have at least 637 | the "copyright" line and a pointer to where the full notice is found. 638 | . 639 | 640 | Copyright (C) 641 | . 642 | This program is free software: you can redistribute it and/or modify 643 | it under the terms of the GNU Affero General Public License as published by 644 | the Free Software Foundation, either version 3 of the License, or 645 | (at your option) any later version. 646 | . 647 | This program is distributed in the hope that it will be useful, 648 | but WITHOUT ANY WARRANTY; without even the implied warranty of 649 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 650 | GNU Affero General Public License for more details. 651 | . 652 | You should have received a copy of the GNU Affero General Public License 653 | along with this program. If not, see . 654 | . 655 | Also add information on how to contact you by electronic and paper mail. 656 | . 657 | If your software can interact with users remotely through a computer 658 | network, you should also make sure that it provides a way for users to 659 | get its source. For example, if your program is a web application, its 660 | interface could display a "Source" link that leads users to an archive 661 | of the code. There are many ways you could offer source, and different 662 | solutions will be better for different programs; see section 13 for the 663 | specific requirements. 664 | . 665 | You should also get your employer (if you work as a programmer) or school, 666 | if any, to sign a "copyright disclaimer" for the program, if necessary. 667 | For more information on this, and how to apply and follow the GNU AGPL, see 668 | . 669 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # application launcher to start apps in a restrictive sandbox # 2 | 3 | sandbox-app-launcher runs each app as its own user, in a bubblewrap sandbox 4 | and confined by apparmor. 5 | 6 | The directory, `/shared`, is shared across all app sandboxes to transfer 7 | files across. 8 | 9 | This implements a permissions system to configure what apps can access. 10 | There are currently 5 available permissions: 11 | 12 | * Network access 13 | 14 | * Webcam access 15 | 16 | * Microphone access 17 | 18 | * Shared storage access (read-only or read-write) 19 | 20 | * Dynamic native code execution 21 | 22 | All apps the user installs will be automatically configured to run in 23 | the sandbox and a prompt will ask the user which permissions they wish to 24 | grant the application (not implemented yet). 25 | 26 | Currently a WIP and not for actual use. 27 | 28 | ## How to install `sandbox-app-launcher` using apt-get ## 29 | 30 | 1\. Download the APT Signing Key. 31 | 32 | ``` 33 | wget https://www.kicksecure.com/keys/derivative.asc 34 | ``` 35 | 36 | Users can [check the Signing Key](https://www.kicksecure.com/wiki/Signing_Key) for better security. 37 | 38 | 2\. Add the APT Signing Key. 39 | 40 | ``` 41 | sudo cp ~/derivative.asc /usr/share/keyrings/derivative.asc 42 | ``` 43 | 44 | 3\. Add the derivative repository. 45 | 46 | ``` 47 | echo "deb [signed-by=/usr/share/keyrings/derivative.asc] https://deb.kicksecure.com bookworm main contrib non-free" | sudo tee /etc/apt/sources.list.d/derivative.list 48 | ``` 49 | 50 | 4\. Update your package lists. 51 | 52 | ``` 53 | sudo apt-get update 54 | ``` 55 | 56 | 5\. Install `sandbox-app-launcher`. 57 | 58 | ``` 59 | sudo apt-get install sandbox-app-launcher 60 | ``` 61 | 62 | ## How to Build deb Package from Source Code ## 63 | 64 | Can be build using standard Debian package build tools such as: 65 | 66 | ``` 67 | dpkg-buildpackage -b 68 | ``` 69 | 70 | See instructions. 71 | 72 | NOTE: Replace `generic-package` with the actual name of this package `sandbox-app-launcher`. 73 | 74 | * **A)** [easy](https://www.kicksecure.com/wiki/Dev/Build_Documentation/generic-package/easy), _OR_ 75 | * **B)** [including verifying software signatures](https://www.kicksecure.com/wiki/Dev/Build_Documentation/generic-package) 76 | 77 | ## Contact ## 78 | 79 | * [Free Forum Support](https://forums.kicksecure.com) 80 | * [Premium Support](https://www.kicksecure.com/wiki/Premium_Support) 81 | 82 | ## Donate ## 83 | 84 | `sandbox-app-launcher` requires [donations](https://www.kicksecure.com/wiki/Donate) to stay alive! 85 | -------------------------------------------------------------------------------- /auto-generated-man-pages/sandbox-app-launcher.8: -------------------------------------------------------------------------------- 1 | .\" generated with Ronn-NG/v0.9.1 2 | .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 3 | .TH "SANDBOX\-APP\-LAUNCHER" "8" "January 2020" "sandbox-app-launcher" "sandbox-app-launcher Manual" 4 | .SH "NAME" 5 | \fBsandbox\-app\-launcher\fR \- start application in sandbox 6 | .SH "SYNOPSIS" 7 | \fBsandbox\-app\-launcher\fR application\-name 8 | .SH "DESCRIPTION" 9 | TODO 10 | .SH "EXAMPLE" 11 | TODO 12 | .SH "AUTHOR" 13 | This man page has been written by Patrick Schleizer (adrelanos@whonix\.org)\. 14 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | sandbox-app-launcher (0:6.9-1) unstable; urgency=medium 2 | 3 | * New upstream version (local package). 4 | 5 | -- Patrick Schleizer Thu, 30 Jan 2025 12:58:06 +0000 6 | 7 | sandbox-app-launcher (0:6.8-1) unstable; urgency=medium 8 | 9 | * New upstream version (local package). 10 | 11 | -- Patrick Schleizer Thu, 23 Jan 2025 16:27:58 +0000 12 | 13 | sandbox-app-launcher (0:6.7-1) unstable; urgency=medium 14 | 15 | * New upstream version (local package). 16 | 17 | -- Patrick Schleizer Tue, 31 Dec 2024 18:41:03 +0000 18 | 19 | sandbox-app-launcher (0:6.6-1) unstable; urgency=medium 20 | 21 | * New upstream version (local package). 22 | 23 | -- Patrick Schleizer Sat, 11 Nov 2023 20:21:44 +0000 24 | 25 | sandbox-app-launcher (0:6.5-1) unstable; urgency=medium 26 | 27 | * New upstream version (local package). 28 | 29 | -- Patrick Schleizer Sat, 21 Oct 2023 16:34:45 +0000 30 | 31 | sandbox-app-launcher (0:6.4-1) unstable; urgency=medium 32 | 33 | * New upstream version (local package). 34 | 35 | -- Patrick Schleizer Tue, 22 Aug 2023 13:44:26 +0000 36 | 37 | sandbox-app-launcher (0:6.3-1) unstable; urgency=medium 38 | 39 | * New upstream version (local package). 40 | 41 | -- Patrick Schleizer Mon, 17 Jul 2023 15:47:57 +0000 42 | 43 | sandbox-app-launcher (0:6.2-1) unstable; urgency=medium 44 | 45 | * New upstream version (local package). 46 | 47 | -- Patrick Schleizer Wed, 21 Jun 2023 09:35:58 +0000 48 | 49 | sandbox-app-launcher (0:6.1-1) unstable; urgency=medium 50 | 51 | * New upstream version (local package). 52 | 53 | -- Patrick Schleizer Fri, 16 Jun 2023 11:08:27 +0000 54 | 55 | sandbox-app-launcher (0:6.0-1) unstable; urgency=medium 56 | 57 | * New upstream version (local package). 58 | 59 | -- Patrick Schleizer Thu, 15 Jun 2023 17:04:24 +0000 60 | 61 | sandbox-app-launcher (0:5.9-1) unstable; urgency=medium 62 | 63 | * New upstream version (local package). 64 | 65 | -- Patrick Schleizer Mon, 12 Jun 2023 18:01:16 +0000 66 | 67 | sandbox-app-launcher (0:5.8-1) unstable; urgency=medium 68 | 69 | * New upstream version (local package). 70 | 71 | -- Patrick Schleizer Mon, 12 Jun 2023 15:24:53 +0000 72 | 73 | sandbox-app-launcher (0:5.7-1) unstable; urgency=medium 74 | 75 | * New upstream version (local package). 76 | 77 | -- Patrick Schleizer Sat, 24 Sep 2022 13:22:44 +0000 78 | 79 | sandbox-app-launcher (0:5.6-1) unstable; urgency=medium 80 | 81 | * New upstream version (local package). 82 | 83 | -- Patrick Schleizer Tue, 26 Jul 2022 10:56:36 +0000 84 | 85 | sandbox-app-launcher (0:5.5-1) unstable; urgency=medium 86 | 87 | * New upstream version (local package). 88 | 89 | -- Patrick Schleizer Sun, 24 Jul 2022 18:10:00 +0000 90 | 91 | sandbox-app-launcher (0:5.4-1) unstable; urgency=medium 92 | 93 | * New upstream version (local package). 94 | 95 | -- Patrick Schleizer Sun, 24 Jul 2022 17:13:54 +0000 96 | 97 | sandbox-app-launcher (0:5.3-1) unstable; urgency=medium 98 | 99 | * New upstream version (local package). 100 | 101 | -- Patrick Schleizer Wed, 25 May 2022 10:07:15 +0000 102 | 103 | sandbox-app-launcher (0:5.2-1) unstable; urgency=medium 104 | 105 | * New upstream version (local package). 106 | 107 | -- Patrick Schleizer Sun, 12 Sep 2021 15:55:36 +0000 108 | 109 | sandbox-app-launcher (0:5.1-1) unstable; urgency=medium 110 | 111 | * New upstream version (local package). 112 | 113 | -- Patrick Schleizer Sun, 22 Aug 2021 09:30:56 +0000 114 | 115 | sandbox-app-launcher (0:5.0-1) unstable; urgency=medium 116 | 117 | * New upstream version (local package). 118 | 119 | -- Patrick Schleizer Thu, 05 Aug 2021 21:01:45 +0000 120 | 121 | sandbox-app-launcher (0:4.9-1) unstable; urgency=medium 122 | 123 | * New upstream version (local package). 124 | 125 | -- Patrick Schleizer Tue, 15 Jun 2021 17:09:13 +0000 126 | 127 | sandbox-app-launcher (0:4.8-1) unstable; urgency=medium 128 | 129 | * New upstream version (local package). 130 | 131 | -- Patrick Schleizer Wed, 09 Jun 2021 18:08:53 +0000 132 | 133 | sandbox-app-launcher (0:4.7-1) unstable; urgency=medium 134 | 135 | * New upstream version (local package). 136 | 137 | -- Patrick Schleizer Tue, 01 Jun 2021 11:35:09 +0000 138 | 139 | sandbox-app-launcher (0:4.6-1) unstable; urgency=medium 140 | 141 | * New upstream version (local package). 142 | 143 | -- Patrick Schleizer Wed, 31 Mar 2021 23:32:06 +0000 144 | 145 | sandbox-app-launcher (0:4.5-1) unstable; urgency=medium 146 | 147 | * New upstream version (local package). 148 | 149 | -- Patrick Schleizer Wed, 31 Mar 2021 15:12:46 +0000 150 | 151 | sandbox-app-launcher (0:4.4-1) unstable; urgency=medium 152 | 153 | * New upstream version (local package). 154 | 155 | -- Patrick Schleizer Tue, 23 Mar 2021 11:48:04 +0000 156 | 157 | sandbox-app-launcher (0:4.3-1) unstable; urgency=medium 158 | 159 | * New upstream version (local package). 160 | 161 | -- Patrick Schleizer Fri, 19 Mar 2021 16:41:16 +0000 162 | 163 | sandbox-app-launcher (0:4.2-1) unstable; urgency=medium 164 | 165 | * New upstream version (local package). 166 | 167 | -- Patrick Schleizer Fri, 19 Mar 2021 12:49:33 +0000 168 | 169 | sandbox-app-launcher (0:4.1-1) unstable; urgency=medium 170 | 171 | * New upstream version (local package). 172 | 173 | -- Patrick Schleizer Thu, 18 Mar 2021 13:07:57 +0000 174 | 175 | sandbox-app-launcher (0:4.0-1) unstable; urgency=medium 176 | 177 | * New upstream version (local package). 178 | 179 | -- Patrick Schleizer Thu, 18 Mar 2021 11:45:55 +0000 180 | 181 | sandbox-app-launcher (0:3.9-1) unstable; urgency=medium 182 | 183 | * New upstream version (local package). 184 | 185 | -- Patrick Schleizer Wed, 17 Mar 2021 16:29:07 +0000 186 | 187 | sandbox-app-launcher (0:3.8-1) unstable; urgency=medium 188 | 189 | * New upstream version (local package). 190 | 191 | -- Patrick Schleizer Thu, 14 Jan 2021 07:35:12 +0000 192 | 193 | sandbox-app-launcher (0:3.7-1) unstable; urgency=medium 194 | 195 | * New upstream version (local package). 196 | 197 | -- Patrick Schleizer Fri, 25 Dec 2020 12:30:42 +0000 198 | 199 | sandbox-app-launcher (0:3.6-1) unstable; urgency=medium 200 | 201 | * New upstream version (local package). 202 | 203 | -- Patrick Schleizer Thu, 24 Dec 2020 16:33:48 +0000 204 | 205 | sandbox-app-launcher (0:3.5-1) unstable; urgency=medium 206 | 207 | * New upstream version (local package). 208 | 209 | -- Patrick Schleizer Sun, 15 Nov 2020 18:14:17 +0000 210 | 211 | sandbox-app-launcher (0:3.4-1) unstable; urgency=medium 212 | 213 | * New upstream version (local package). 214 | 215 | -- Patrick Schleizer Fri, 06 Nov 2020 15:16:40 +0000 216 | 217 | sandbox-app-launcher (0:3.3-1) unstable; urgency=medium 218 | 219 | * New upstream version (local package). 220 | 221 | -- Patrick Schleizer Thu, 05 Nov 2020 07:22:14 +0000 222 | 223 | sandbox-app-launcher (0:3.2-1) unstable; urgency=medium 224 | 225 | * New upstream version (local package). 226 | 227 | -- Patrick Schleizer Mon, 02 Nov 2020 07:53:57 +0000 228 | 229 | sandbox-app-launcher (0:3.1-1) unstable; urgency=medium 230 | 231 | * New upstream version (local package). 232 | 233 | -- Patrick Schleizer Sat, 31 Oct 2020 14:26:16 +0000 234 | 235 | sandbox-app-launcher (0:3.0-1) unstable; urgency=medium 236 | 237 | * New upstream version (local package). 238 | 239 | -- Patrick Schleizer Sat, 31 Oct 2020 12:52:07 +0000 240 | 241 | sandbox-app-launcher (0:2.9-1) unstable; urgency=medium 242 | 243 | * New upstream version (local package). 244 | 245 | -- Patrick Schleizer Sat, 31 Oct 2020 11:52:01 +0000 246 | 247 | sandbox-app-launcher (0:2.8-1) unstable; urgency=medium 248 | 249 | * New upstream version (local package). 250 | 251 | -- Patrick Schleizer Sat, 31 Oct 2020 10:36:11 +0000 252 | 253 | sandbox-app-launcher (0:2.7-1) unstable; urgency=medium 254 | 255 | * New upstream version (local package). 256 | 257 | -- Patrick Schleizer Sat, 31 Oct 2020 10:28:44 +0000 258 | 259 | sandbox-app-launcher (0:2.6-1) unstable; urgency=medium 260 | 261 | * New upstream version (local package). 262 | 263 | -- Patrick Schleizer Sat, 31 Oct 2020 10:08:40 +0000 264 | 265 | sandbox-app-launcher (0:2.5-1) unstable; urgency=medium 266 | 267 | * New upstream version (local package). 268 | 269 | -- Patrick Schleizer Fri, 30 Oct 2020 13:56:54 +0000 270 | 271 | sandbox-app-launcher (0:2.4-1) unstable; urgency=medium 272 | 273 | * New upstream version (local package). 274 | 275 | -- Patrick Schleizer Thu, 29 Oct 2020 19:59:45 +0000 276 | 277 | sandbox-app-launcher (0:2.3-1) unstable; urgency=medium 278 | 279 | * New upstream version (local package). 280 | 281 | -- Patrick Schleizer Thu, 08 Oct 2020 17:41:32 +0000 282 | 283 | sandbox-app-launcher (0:2.2-1) unstable; urgency=medium 284 | 285 | * New upstream version (local package). 286 | 287 | -- Patrick Schleizer Wed, 07 Oct 2020 14:33:25 +0000 288 | 289 | sandbox-app-launcher (0:2.1-1) unstable; urgency=medium 290 | 291 | * New upstream version (local package). 292 | 293 | -- Patrick Schleizer Mon, 05 Oct 2020 11:02:51 +0000 294 | 295 | sandbox-app-launcher (0:2.0-1) unstable; urgency=medium 296 | 297 | * New upstream version (local package). 298 | 299 | -- Patrick Schleizer Sun, 27 Sep 2020 15:46:29 +0000 300 | 301 | sandbox-app-launcher (0:1.9-1) unstable; urgency=medium 302 | 303 | * New upstream version (local package). 304 | 305 | -- Patrick Schleizer Tue, 16 Jun 2020 13:33:21 +0000 306 | 307 | sandbox-app-launcher (0:1.8-1) unstable; urgency=medium 308 | 309 | * New upstream version (local package). 310 | 311 | -- Patrick Schleizer Wed, 03 Jun 2020 14:01:32 +0000 312 | 313 | sandbox-app-launcher (0:1.7-1) unstable; urgency=medium 314 | 315 | * New upstream version (local package). 316 | 317 | -- Patrick Schleizer Wed, 03 Jun 2020 13:55:59 +0000 318 | 319 | sandbox-app-launcher (0:1.6-1) unstable; urgency=medium 320 | 321 | * New upstream version (local package). 322 | 323 | -- Patrick Schleizer Fri, 29 May 2020 11:41:26 +0000 324 | 325 | sandbox-app-launcher (0:1.5-1) unstable; urgency=medium 326 | 327 | * New upstream version (local package). 328 | 329 | -- Patrick Schleizer Thu, 28 May 2020 13:47:04 +0000 330 | 331 | sandbox-app-launcher (0:1.4-1) unstable; urgency=medium 332 | 333 | * New upstream version (local package). 334 | 335 | -- Patrick Schleizer Thu, 16 Apr 2020 12:41:58 +0000 336 | 337 | sandbox-app-launcher (0:1.3-1) unstable; urgency=medium 338 | 339 | * New upstream version (local package). 340 | 341 | -- Patrick Schleizer Wed, 08 Apr 2020 13:20:50 +0000 342 | 343 | sandbox-app-launcher (0:1.2-1) unstable; urgency=medium 344 | 345 | * New upstream version (local package). 346 | 347 | -- Patrick Schleizer Mon, 06 Apr 2020 17:32:26 +0000 348 | 349 | sandbox-app-launcher (0:1.1-1) unstable; urgency=medium 350 | 351 | * New upstream version (local package). 352 | 353 | -- Patrick Schleizer Mon, 06 Apr 2020 17:24:27 +0000 354 | 355 | sandbox-app-launcher (0:1.0-1) unstable; urgency=medium 356 | 357 | * New upstream version (local package). 358 | 359 | -- Patrick Schleizer Sun, 05 Apr 2020 19:06:19 +0000 360 | 361 | sandbox-app-launcher (0:0.9-1) unstable; urgency=medium 362 | 363 | * New upstream version (local package). 364 | 365 | -- Patrick Schleizer Sun, 05 Apr 2020 17:28:18 +0000 366 | 367 | sandbox-app-launcher (0:0.8-1) unstable; urgency=medium 368 | 369 | * New upstream version (local package). 370 | 371 | -- Patrick Schleizer Sat, 04 Apr 2020 20:41:29 +0000 372 | 373 | sandbox-app-launcher (0:0.7-1) unstable; urgency=medium 374 | 375 | * New upstream version (local package). 376 | 377 | -- Patrick Schleizer Sat, 04 Apr 2020 10:36:40 +0000 378 | 379 | sandbox-app-launcher (0:0.6-1) unstable; urgency=medium 380 | 381 | * New upstream version (local package). 382 | 383 | -- Patrick Schleizer Fri, 03 Apr 2020 09:10:04 +0000 384 | 385 | sandbox-app-launcher (0:0.5-1) unstable; urgency=medium 386 | 387 | * New upstream version (local package). 388 | 389 | -- Patrick Schleizer Thu, 02 Apr 2020 22:23:14 +0000 390 | 391 | sandbox-app-launcher (0:0.4-1) unstable; urgency=medium 392 | 393 | * New upstream version (local package). 394 | 395 | -- Patrick Schleizer Thu, 02 Apr 2020 20:17:45 +0000 396 | 397 | sandbox-app-launcher (0:0.3-1) unstable; urgency=medium 398 | 399 | * New upstream version (local package). 400 | 401 | -- Patrick Schleizer Thu, 02 Apr 2020 16:34:57 +0000 402 | 403 | sandbox-app-launcher (0:0.2-1) unstable; urgency=low 404 | 405 | * New upstream version. 406 | 407 | -- Patrick Schleizer Thu, 02 Apr 2020 10:25:00 +0000 408 | 409 | sandbox-app-launcher (0:0.1-2) unstable; urgency=low 410 | 411 | * Initial release. 412 | 413 | -- Patrick Schleizer Thu, 02 Apr 2020 10:24:12 +0000 414 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | Source: sandbox-app-launcher 5 | Section: misc 6 | Priority: optional 7 | Maintainer: Patrick Schleizer 8 | Build-Depends: debhelper (>= 13), debhelper-compat (= 13), dh-apparmor 9 | Homepage: https://www.kicksecure.com/wiki/Sandbox-app-launcher 10 | Vcs-Browser: https://github.com/Kicksecure/sandbox-app-launcher 11 | Vcs-Git: https://github.com/Kicksecure/sandbox-app-launcher.git 12 | Standards-Version: 4.6.2 13 | Rules-Requires-Root: no 14 | 15 | Package: sandbox-app-launcher 16 | Architecture: all 17 | Depends: sudo, bubblewrap, apparmor, libseccomp-dev, helper-scripts, 18 | dbus-x11, ${misc:Depends} 19 | Description: application launcher to start apps in a restrictive sandbox 20 | sandbox-app-launcher runs each app as its own user, in a bubblewrap sandbox 21 | and confined by apparmor. 22 | . 23 | The directory, `/shared`, is shared across all app sandboxes to transfer 24 | files across. 25 | . 26 | This implements a permissions system to configure what apps can access. 27 | There are currently 5 available permissions: 28 | . 29 | * Network access 30 | . 31 | * Webcam access 32 | . 33 | * Microphone access 34 | . 35 | * Shared storage access (read-only or read-write) 36 | . 37 | * Dynamic native code execution 38 | . 39 | All apps the user installs will be automatically configured to run in 40 | the sandbox and a prompt will ask the user which permissions they wish to 41 | grant the application (not implemented yet). 42 | . 43 | Currently a WIP and not for actual use. 44 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | 3 | Files: * 4 | Copyright: 2012 - 2025 ENCRYPTED SUPPORT LLC 5 | License: AGPL-3+ 6 | 7 | License: AGPL-3+ 8 | GNU AFFERO GENERAL PUBLIC LICENSE 9 | Version 3, 19 November 2007 10 | . 11 | Copyright (C) 2007 Free Software Foundation, Inc. 12 | Everyone is permitted to copy and distribute verbatim copies 13 | of this license document, but changing it is not allowed. 14 | . 15 | Preamble 16 | . 17 | The GNU Affero General Public License is a free, copyleft license for 18 | software and other kinds of works, specifically designed to ensure 19 | cooperation with the community in the case of network server software. 20 | . 21 | The licenses for most software and other practical works are designed 22 | to take away your freedom to share and change the works. By contrast, 23 | our General Public Licenses are intended to guarantee your freedom to 24 | share and change all versions of a program--to make sure it remains free 25 | software for all its users. 26 | . 27 | When we speak of free software, we are referring to freedom, not 28 | price. Our General Public Licenses are designed to make sure that you 29 | have the freedom to distribute copies of free software (and charge for 30 | them if you wish), that you receive source code or can get it if you 31 | want it, that you can change the software or use pieces of it in new 32 | free programs, and that you know you can do these things. 33 | . 34 | Developers that use our General Public Licenses protect your rights 35 | with two steps: (1) assert copyright on the software, and (2) offer 36 | you this License which gives you legal permission to copy, distribute 37 | and/or modify the software. 38 | . 39 | A secondary benefit of defending all users' freedom is that 40 | improvements made in alternate versions of the program, if they 41 | receive widespread use, become available for other developers to 42 | incorporate. Many developers of free software are heartened and 43 | encouraged by the resulting cooperation. However, in the case of 44 | software used on network servers, this result may fail to come about. 45 | The GNU General Public License permits making a modified version and 46 | letting the public access it on a server without ever releasing its 47 | source code to the public. 48 | . 49 | The GNU Affero General Public License is designed specifically to 50 | ensure that, in such cases, the modified source code becomes available 51 | to the community. It requires the operator of a network server to 52 | provide the source code of the modified version running there to the 53 | users of that server. Therefore, public use of a modified version, on 54 | a publicly accessible server, gives the public access to the source 55 | code of the modified version. 56 | . 57 | An older license, called the Affero General Public License and 58 | published by Affero, was designed to accomplish similar goals. This is 59 | a different license, not a version of the Affero GPL, but Affero has 60 | released a new version of the Affero GPL which permits relicensing under 61 | this license. 62 | . 63 | The precise terms and conditions for copying, distribution and 64 | modification follow. 65 | . 66 | TERMS AND CONDITIONS 67 | . 68 | 0. Definitions. 69 | . 70 | "This License" refers to version 3 of the GNU Affero General Public License. 71 | . 72 | "Copyright" also means copyright-like laws that apply to other kinds of 73 | works, such as semiconductor masks. 74 | . 75 | "The Program" refers to any copyrightable work licensed under this 76 | License. Each licensee is addressed as "you". "Licensees" and 77 | "recipients" may be individuals or organizations. 78 | . 79 | To "modify" a work means to copy from or adapt all or part of the work 80 | in a fashion requiring copyright permission, other than the making of an 81 | exact copy. The resulting work is called a "modified version" of the 82 | earlier work or a work "based on" the earlier work. 83 | . 84 | A "covered work" means either the unmodified Program or a work based 85 | on the Program. 86 | . 87 | To "propagate" a work means to do anything with it that, without 88 | permission, would make you directly or secondarily liable for 89 | infringement under applicable copyright law, except executing it on a 90 | computer or modifying a private copy. Propagation includes copying, 91 | distribution (with or without modification), making available to the 92 | public, and in some countries other activities as well. 93 | . 94 | To "convey" a work means any kind of propagation that enables other 95 | parties to make or receive copies. Mere interaction with a user through 96 | a computer network, with no transfer of a copy, is not conveying. 97 | . 98 | An interactive user interface displays "Appropriate Legal Notices" 99 | to the extent that it includes a convenient and prominently visible 100 | feature that (1) displays an appropriate copyright notice, and (2) 101 | tells the user that there is no warranty for the work (except to the 102 | extent that warranties are provided), that licensees may convey the 103 | work under this License, and how to view a copy of this License. If 104 | the interface presents a list of user commands or options, such as a 105 | menu, a prominent item in the list meets this criterion. 106 | . 107 | 1. Source Code. 108 | . 109 | The "source code" for a work means the preferred form of the work 110 | for making modifications to it. "Object code" means any non-source 111 | form of a work. 112 | . 113 | A "Standard Interface" means an interface that either is an official 114 | standard defined by a recognized standards body, or, in the case of 115 | interfaces specified for a particular programming language, one that 116 | is widely used among developers working in that language. 117 | . 118 | The "System Libraries" of an executable work include anything, other 119 | than the work as a whole, that (a) is included in the normal form of 120 | packaging a Major Component, but which is not part of that Major 121 | Component, and (b) serves only to enable use of the work with that 122 | Major Component, or to implement a Standard Interface for which an 123 | implementation is available to the public in source code form. A 124 | "Major Component", in this context, means a major essential component 125 | (kernel, window system, and so on) of the specific operating system 126 | (if any) on which the executable work runs, or a compiler used to 127 | produce the work, or an object code interpreter used to run it. 128 | . 129 | The "Corresponding Source" for a work in object code form means all 130 | the source code needed to generate, install, and (for an executable 131 | work) run the object code and to modify the work, including scripts to 132 | control those activities. However, it does not include the work's 133 | System Libraries, or general-purpose tools or generally available free 134 | programs which are used unmodified in performing those activities but 135 | which are not part of the work. For example, Corresponding Source 136 | includes interface definition files associated with source files for 137 | the work, and the source code for shared libraries and dynamically 138 | linked subprograms that the work is specifically designed to require, 139 | such as by intimate data communication or control flow between those 140 | subprograms and other parts of the work. 141 | . 142 | The Corresponding Source need not include anything that users 143 | can regenerate automatically from other parts of the Corresponding 144 | Source. 145 | . 146 | The Corresponding Source for a work in source code form is that 147 | same work. 148 | . 149 | 2. Basic Permissions. 150 | . 151 | All rights granted under this License are granted for the term of 152 | copyright on the Program, and are irrevocable provided the stated 153 | conditions are met. This License explicitly affirms your unlimited 154 | permission to run the unmodified Program. The output from running a 155 | covered work is covered by this License only if the output, given its 156 | content, constitutes a covered work. This License acknowledges your 157 | rights of fair use or other equivalent, as provided by copyright law. 158 | . 159 | You may make, run and propagate covered works that you do not 160 | convey, without conditions so long as your license otherwise remains 161 | in force. You may convey covered works to others for the sole purpose 162 | of having them make modifications exclusively for you, or provide you 163 | with facilities for running those works, provided that you comply with 164 | the terms of this License in conveying all material for which you do 165 | not control copyright. Those thus making or running the covered works 166 | for you must do so exclusively on your behalf, under your direction 167 | and control, on terms that prohibit them from making any copies of 168 | your copyrighted material outside their relationship with you. 169 | . 170 | Conveying under any other circumstances is permitted solely under 171 | the conditions stated below. Sublicensing is not allowed; section 10 172 | makes it unnecessary. 173 | . 174 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 175 | . 176 | No covered work shall be deemed part of an effective technological 177 | measure under any applicable law fulfilling obligations under article 178 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 179 | similar laws prohibiting or restricting circumvention of such 180 | measures. 181 | . 182 | When you convey a covered work, you waive any legal power to forbid 183 | circumvention of technological measures to the extent such circumvention 184 | is effected by exercising rights under this License with respect to 185 | the covered work, and you disclaim any intention to limit operation or 186 | modification of the work as a means of enforcing, against the work's 187 | users, your or third parties' legal rights to forbid circumvention of 188 | technological measures. 189 | . 190 | 4. Conveying Verbatim Copies. 191 | . 192 | You may convey verbatim copies of the Program's source code as you 193 | receive it, in any medium, provided that you conspicuously and 194 | appropriately publish on each copy an appropriate copyright notice; 195 | keep intact all notices stating that this License and any 196 | non-permissive terms added in accord with section 7 apply to the code; 197 | keep intact all notices of the absence of any warranty; and give all 198 | recipients a copy of this License along with the Program. 199 | . 200 | You may charge any price or no price for each copy that you convey, 201 | and you may offer support or warranty protection for a fee. 202 | . 203 | 5. Conveying Modified Source Versions. 204 | . 205 | You may convey a work based on the Program, or the modifications to 206 | produce it from the Program, in the form of source code under the 207 | terms of section 4, provided that you also meet all of these conditions: 208 | . 209 | a) The work must carry prominent notices stating that you modified 210 | it, and giving a relevant date. 211 | . 212 | b) The work must carry prominent notices stating that it is 213 | released under this License and any conditions added under section 214 | 7. This requirement modifies the requirement in section 4 to 215 | "keep intact all notices". 216 | . 217 | c) You must license the entire work, as a whole, under this 218 | License to anyone who comes into possession of a copy. This 219 | License will therefore apply, along with any applicable section 7 220 | additional terms, to the whole of the work, and all its parts, 221 | regardless of how they are packaged. This License gives no 222 | permission to license the work in any other way, but it does not 223 | invalidate such permission if you have separately received it. 224 | . 225 | d) If the work has interactive user interfaces, each must display 226 | Appropriate Legal Notices; however, if the Program has interactive 227 | interfaces that do not display Appropriate Legal Notices, your 228 | work need not make them do so. 229 | . 230 | A compilation of a covered work with other separate and independent 231 | works, which are not by their nature extensions of the covered work, 232 | and which are not combined with it such as to form a larger program, 233 | in or on a volume of a storage or distribution medium, is called an 234 | "aggregate" if the compilation and its resulting copyright are not 235 | used to limit the access or legal rights of the compilation's users 236 | beyond what the individual works permit. Inclusion of a covered work 237 | in an aggregate does not cause this License to apply to the other 238 | parts of the aggregate. 239 | . 240 | 6. Conveying Non-Source Forms. 241 | . 242 | You may convey a covered work in object code form under the terms 243 | of sections 4 and 5, provided that you also convey the 244 | machine-readable Corresponding Source under the terms of this License, 245 | in one of these ways: 246 | . 247 | a) Convey the object code in, or embodied in, a physical product 248 | (including a physical distribution medium), accompanied by the 249 | Corresponding Source fixed on a durable physical medium 250 | customarily used for software interchange. 251 | . 252 | b) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by a 254 | written offer, valid for at least three years and valid for as 255 | long as you offer spare parts or customer support for that product 256 | model, to give anyone who possesses the object code either (1) a 257 | copy of the Corresponding Source for all the software in the 258 | product that is covered by this License, on a durable physical 259 | medium customarily used for software interchange, for a price no 260 | more than your reasonable cost of physically performing this 261 | conveying of source, or (2) access to copy the 262 | Corresponding Source from a network server at no charge. 263 | . 264 | c) Convey individual copies of the object code with a copy of the 265 | written offer to provide the Corresponding Source. This 266 | alternative is allowed only occasionally and noncommercially, and 267 | only if you received the object code with such an offer, in accord 268 | with subsection 6b. 269 | . 270 | d) Convey the object code by offering access from a designated 271 | place (gratis or for a charge), and offer equivalent access to the 272 | Corresponding Source in the same way through the same place at no 273 | further charge. You need not require recipients to copy the 274 | Corresponding Source along with the object code. If the place to 275 | copy the object code is a network server, the Corresponding Source 276 | may be on a different server (operated by you or a third party) 277 | that supports equivalent copying facilities, provided you maintain 278 | clear directions next to the object code saying where to find the 279 | Corresponding Source. Regardless of what server hosts the 280 | Corresponding Source, you remain obligated to ensure that it is 281 | available for as long as needed to satisfy these requirements. 282 | . 283 | e) Convey the object code using peer-to-peer transmission, provided 284 | you inform other peers where the object code and Corresponding 285 | Source of the work are being offered to the general public at no 286 | charge under subsection 6d. 287 | . 288 | A separable portion of the object code, whose source code is excluded 289 | from the Corresponding Source as a System Library, need not be 290 | included in conveying the object code work. 291 | . 292 | A "User Product" is either (1) a "consumer product", which means any 293 | tangible personal property which is normally used for personal, family, 294 | or household purposes, or (2) anything designed or sold for incorporation 295 | into a dwelling. In determining whether a product is a consumer product, 296 | doubtful cases shall be resolved in favor of coverage. For a particular 297 | product received by a particular user, "normally used" refers to a 298 | typical or common use of that class of product, regardless of the status 299 | of the particular user or of the way in which the particular user 300 | actually uses, or expects or is expected to use, the product. A product 301 | is a consumer product regardless of whether the product has substantial 302 | commercial, industrial or non-consumer uses, unless such uses represent 303 | the only significant mode of use of the product. 304 | . 305 | "Installation Information" for a User Product means any methods, 306 | procedures, authorization keys, or other information required to install 307 | and execute modified versions of a covered work in that User Product from 308 | a modified version of its Corresponding Source. The information must 309 | suffice to ensure that the continued functioning of the modified object 310 | code is in no case prevented or interfered with solely because 311 | modification has been made. 312 | . 313 | If you convey an object code work under this section in, or with, or 314 | specifically for use in, a User Product, and the conveying occurs as 315 | part of a transaction in which the right of possession and use of the 316 | User Product is transferred to the recipient in perpetuity or for a 317 | fixed term (regardless of how the transaction is characterized), the 318 | Corresponding Source conveyed under this section must be accompanied 319 | by the Installation Information. But this requirement does not apply 320 | if neither you nor any third party retains the ability to install 321 | modified object code on the User Product (for example, the work has 322 | been installed in ROM). 323 | . 324 | The requirement to provide Installation Information does not include a 325 | requirement to continue to provide support service, warranty, or updates 326 | for a work that has been modified or installed by the recipient, or for 327 | the User Product in which it has been modified or installed. Access to a 328 | network may be denied when the modification itself materially and 329 | adversely affects the operation of the network or violates the rules and 330 | protocols for communication across the network. 331 | . 332 | Corresponding Source conveyed, and Installation Information provided, 333 | in accord with this section must be in a format that is publicly 334 | documented (and with an implementation available to the public in 335 | source code form), and must require no special password or key for 336 | unpacking, reading or copying. 337 | . 338 | 7. Additional Terms. 339 | . 340 | "Additional permissions" are terms that supplement the terms of this 341 | License by making exceptions from one or more of its conditions. 342 | Additional permissions that are applicable to the entire Program shall 343 | be treated as though they were included in this License, to the extent 344 | that they are valid under applicable law. If additional permissions 345 | apply only to part of the Program, that part may be used separately 346 | under those permissions, but the entire Program remains governed by 347 | this License without regard to the additional permissions. 348 | . 349 | When you convey a copy of a covered work, you may at your option 350 | remove any additional permissions from that copy, or from any part of 351 | it. (Additional permissions may be written to require their own 352 | removal in certain cases when you modify the work.) You may place 353 | additional permissions on material, added by you to a covered work, 354 | for which you have or can give appropriate copyright permission. 355 | . 356 | Notwithstanding any other provision of this License, for material you 357 | add to a covered work, you may (if authorized by the copyright holders of 358 | that material) supplement the terms of this License with terms: 359 | . 360 | a) Disclaiming warranty or limiting liability differently from the 361 | terms of sections 15 and 16 of this License; or 362 | . 363 | b) Requiring preservation of specified reasonable legal notices or 364 | author attributions in that material or in the Appropriate Legal 365 | Notices displayed by works containing it; or 366 | . 367 | c) Prohibiting misrepresentation of the origin of that material, or 368 | requiring that modified versions of such material be marked in 369 | reasonable ways as different from the original version; or 370 | . 371 | d) Limiting the use for publicity purposes of names of licensors or 372 | authors of the material; or 373 | . 374 | e) Declining to grant rights under trademark law for use of some 375 | trade names, trademarks, or service marks; or 376 | . 377 | f) Requiring indemnification of licensors and authors of that 378 | material by anyone who conveys the material (or modified versions of 379 | it) with contractual assumptions of liability to the recipient, for 380 | any liability that these contractual assumptions directly impose on 381 | those licensors and authors. 382 | . 383 | All other non-permissive additional terms are considered "further 384 | restrictions" within the meaning of section 10. If the Program as you 385 | received it, or any part of it, contains a notice stating that it is 386 | governed by this License along with a term that is a further 387 | restriction, you may remove that term. If a license document contains 388 | a further restriction but permits relicensing or conveying under this 389 | License, you may add to a covered work material governed by the terms 390 | of that license document, provided that the further restriction does 391 | not survive such relicensing or conveying. 392 | . 393 | If you add terms to a covered work in accord with this section, you 394 | must place, in the relevant source files, a statement of the 395 | additional terms that apply to those files, or a notice indicating 396 | where to find the applicable terms. 397 | . 398 | Additional terms, permissive or non-permissive, may be stated in the 399 | form of a separately written license, or stated as exceptions; 400 | the above requirements apply either way. 401 | . 402 | 8. Termination. 403 | . 404 | You may not propagate or modify a covered work except as expressly 405 | provided under this License. Any attempt otherwise to propagate or 406 | modify it is void, and will automatically terminate your rights under 407 | this License (including any patent licenses granted under the third 408 | paragraph of section 11). 409 | . 410 | However, if you cease all violation of this License, then your 411 | license from a particular copyright holder is reinstated (a) 412 | provisionally, unless and until the copyright holder explicitly and 413 | finally terminates your license, and (b) permanently, if the copyright 414 | holder fails to notify you of the violation by some reasonable means 415 | prior to 60 days after the cessation. 416 | . 417 | Moreover, your license from a particular copyright holder is 418 | reinstated permanently if the copyright holder notifies you of the 419 | violation by some reasonable means, this is the first time you have 420 | received notice of violation of this License (for any work) from that 421 | copyright holder, and you cure the violation prior to 30 days after 422 | your receipt of the notice. 423 | . 424 | Termination of your rights under this section does not terminate the 425 | licenses of parties who have received copies or rights from you under 426 | this License. If your rights have been terminated and not permanently 427 | reinstated, you do not qualify to receive new licenses for the same 428 | material under section 10. 429 | . 430 | 9. Acceptance Not Required for Having Copies. 431 | . 432 | You are not required to accept this License in order to receive or 433 | run a copy of the Program. Ancillary propagation of a covered work 434 | occurring solely as a consequence of using peer-to-peer transmission 435 | to receive a copy likewise does not require acceptance. However, 436 | nothing other than this License grants you permission to propagate or 437 | modify any covered work. These actions infringe copyright if you do 438 | not accept this License. Therefore, by modifying or propagating a 439 | covered work, you indicate your acceptance of this License to do so. 440 | . 441 | 10. Automatic Licensing of Downstream Recipients. 442 | . 443 | Each time you convey a covered work, the recipient automatically 444 | receives a license from the original licensors, to run, modify and 445 | propagate that work, subject to this License. You are not responsible 446 | for enforcing compliance by third parties with this License. 447 | . 448 | An "entity transaction" is a transaction transferring control of an 449 | organization, or substantially all assets of one, or subdividing an 450 | organization, or merging organizations. If propagation of a covered 451 | work results from an entity transaction, each party to that 452 | transaction who receives a copy of the work also receives whatever 453 | licenses to the work the party's predecessor in interest had or could 454 | give under the previous paragraph, plus a right to possession of the 455 | Corresponding Source of the work from the predecessor in interest, if 456 | the predecessor has it or can get it with reasonable efforts. 457 | . 458 | You may not impose any further restrictions on the exercise of the 459 | rights granted or affirmed under this License. For example, you may 460 | not impose a license fee, royalty, or other charge for exercise of 461 | rights granted under this License, and you may not initiate litigation 462 | (including a cross-claim or counterclaim in a lawsuit) alleging that 463 | any patent claim is infringed by making, using, selling, offering for 464 | sale, or importing the Program or any portion of it. 465 | . 466 | 11. Patents. 467 | . 468 | A "contributor" is a copyright holder who authorizes use under this 469 | License of the Program or a work on which the Program is based. The 470 | work thus licensed is called the contributor's "contributor version". 471 | . 472 | A contributor's "essential patent claims" are all patent claims 473 | owned or controlled by the contributor, whether already acquired or 474 | hereafter acquired, that would be infringed by some manner, permitted 475 | by this License, of making, using, or selling its contributor version, 476 | but do not include claims that would be infringed only as a 477 | consequence of further modification of the contributor version. For 478 | purposes of this definition, "control" includes the right to grant 479 | patent sublicenses in a manner consistent with the requirements of 480 | this License. 481 | . 482 | Each contributor grants you a non-exclusive, worldwide, royalty-free 483 | patent license under the contributor's essential patent claims, to 484 | make, use, sell, offer for sale, import and otherwise run, modify and 485 | propagate the contents of its contributor version. 486 | . 487 | In the following three paragraphs, a "patent license" is any express 488 | agreement or commitment, however denominated, not to enforce a patent 489 | (such as an express permission to practice a patent or covenant not to 490 | sue for patent infringement). To "grant" such a patent license to a 491 | party means to make such an agreement or commitment not to enforce a 492 | patent against the party. 493 | . 494 | If you convey a covered work, knowingly relying on a patent license, 495 | and the Corresponding Source of the work is not available for anyone 496 | to copy, free of charge and under the terms of this License, through a 497 | publicly available network server or other readily accessible means, 498 | then you must either (1) cause the Corresponding Source to be so 499 | available, or (2) arrange to deprive yourself of the benefit of the 500 | patent license for this particular work, or (3) arrange, in a manner 501 | consistent with the requirements of this License, to extend the patent 502 | license to downstream recipients. "Knowingly relying" means you have 503 | actual knowledge that, but for the patent license, your conveying the 504 | covered work in a country, or your recipient's use of the covered work 505 | in a country, would infringe one or more identifiable patents in that 506 | country that you have reason to believe are valid. 507 | . 508 | If, pursuant to or in connection with a single transaction or 509 | arrangement, you convey, or propagate by procuring conveyance of, a 510 | covered work, and grant a patent license to some of the parties 511 | receiving the covered work authorizing them to use, propagate, modify 512 | or convey a specific copy of the covered work, then the patent license 513 | you grant is automatically extended to all recipients of the covered 514 | work and works based on it. 515 | . 516 | A patent license is "discriminatory" if it does not include within 517 | the scope of its coverage, prohibits the exercise of, or is 518 | conditioned on the non-exercise of one or more of the rights that are 519 | specifically granted under this License. You may not convey a covered 520 | work if you are a party to an arrangement with a third party that is 521 | in the business of distributing software, under which you make payment 522 | to the third party based on the extent of your activity of conveying 523 | the work, and under which the third party grants, to any of the 524 | parties who would receive the covered work from you, a discriminatory 525 | patent license (a) in connection with copies of the covered work 526 | conveyed by you (or copies made from those copies), or (b) primarily 527 | for and in connection with specific products or compilations that 528 | contain the covered work, unless you entered into that arrangement, 529 | or that patent license was granted, prior to 28 March 2007. 530 | . 531 | Nothing in this License shall be construed as excluding or limiting 532 | any implied license or other defenses to infringement that may 533 | otherwise be available to you under applicable patent law. 534 | . 535 | 12. No Surrender of Others' Freedom. 536 | . 537 | If conditions are imposed on you (whether by court order, agreement or 538 | otherwise) that contradict the conditions of this License, they do not 539 | excuse you from the conditions of this License. If you cannot convey a 540 | covered work so as to satisfy simultaneously your obligations under this 541 | License and any other pertinent obligations, then as a consequence you may 542 | not convey it at all. For example, if you agree to terms that obligate you 543 | to collect a royalty for further conveying from those to whom you convey 544 | the Program, the only way you could satisfy both those terms and this 545 | License would be to refrain entirely from conveying the Program. 546 | . 547 | 13. Remote Network Interaction; Use with the GNU General Public License. 548 | . 549 | Notwithstanding any other provision of this License, if you modify the 550 | Program, your modified version must prominently offer all users 551 | interacting with it remotely through a computer network (if your version 552 | supports such interaction) an opportunity to receive the Corresponding 553 | Source of your version by providing access to the Corresponding Source 554 | from a network server at no charge, through some standard or customary 555 | means of facilitating copying of software. This Corresponding Source 556 | shall include the Corresponding Source for any work covered by version 3 557 | of the GNU General Public License that is incorporated pursuant to the 558 | following paragraph. 559 | . 560 | Notwithstanding any other provision of this License, you have 561 | permission to link or combine any covered work with a work licensed 562 | under version 3 of the GNU General Public License into a single 563 | combined work, and to convey the resulting work. The terms of this 564 | License will continue to apply to the part which is the covered work, 565 | but the work with which it is combined will remain governed by version 566 | 3 of the GNU General Public License. 567 | . 568 | 14. Revised Versions of this License. 569 | . 570 | The Free Software Foundation may publish revised and/or new versions of 571 | the GNU Affero General Public License from time to time. Such new versions 572 | will be similar in spirit to the present version, but may differ in detail to 573 | address new problems or concerns. 574 | . 575 | Each version is given a distinguishing version number. If the 576 | Program specifies that a certain numbered version of the GNU Affero General 577 | Public License "or any later version" applies to it, you have the 578 | option of following the terms and conditions either of that numbered 579 | version or of any later version published by the Free Software 580 | Foundation. If the Program does not specify a version number of the 581 | GNU Affero General Public License, you may choose any version ever published 582 | by the Free Software Foundation. 583 | . 584 | If the Program specifies that a proxy can decide which future 585 | versions of the GNU Affero General Public License can be used, that proxy's 586 | public statement of acceptance of a version permanently authorizes you 587 | to choose that version for the Program. 588 | . 589 | Later license versions may give you additional or different 590 | permissions. However, no additional obligations are imposed on any 591 | author or copyright holder as a result of your choosing to follow a 592 | later version. 593 | . 594 | 15. Disclaimer of Warranty. 595 | . 596 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 597 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 598 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 599 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 600 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 601 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 602 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 603 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 604 | . 605 | 16. Limitation of Liability. 606 | . 607 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 608 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 609 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 610 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 611 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 612 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 613 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 614 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 615 | SUCH DAMAGES. 616 | . 617 | 17. Interpretation of Sections 15 and 16. 618 | . 619 | If the disclaimer of warranty and limitation of liability provided 620 | above cannot be given local legal effect according to their terms, 621 | reviewing courts shall apply local law that most closely approximates 622 | an absolute waiver of all civil liability in connection with the 623 | Program, unless a warranty or assumption of liability accompanies a 624 | copy of the Program in return for a fee. 625 | . 626 | END OF TERMS AND CONDITIONS 627 | . 628 | How to Apply These Terms to Your New Programs 629 | . 630 | If you develop a new program, and you want it to be of the greatest 631 | possible use to the public, the best way to achieve this is to make it 632 | free software which everyone can redistribute and change under these terms. 633 | . 634 | To do so, attach the following notices to the program. It is safest 635 | to attach them to the start of each source file to most effectively 636 | state the exclusion of warranty; and each file should have at least 637 | the "copyright" line and a pointer to where the full notice is found. 638 | . 639 | 640 | Copyright (C) 641 | . 642 | This program is free software: you can redistribute it and/or modify 643 | it under the terms of the GNU Affero General Public License as published by 644 | the Free Software Foundation, either version 3 of the License, or 645 | (at your option) any later version. 646 | . 647 | This program is distributed in the hope that it will be useful, 648 | but WITHOUT ANY WARRANTY; without even the implied warranty of 649 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 650 | GNU Affero General Public License for more details. 651 | . 652 | You should have received a copy of the GNU Affero General Public License 653 | along with this program. If not, see . 654 | . 655 | Also add information on how to contact you by electronic and paper mail. 656 | . 657 | If your software can interact with users remotely through a computer 658 | network, you should also make sure that it provides a way for users to 659 | get its source. For example, if your program is a web application, its 660 | interface could display a "Source" link that leads users to an archive 661 | of the code. There are many ways you could offer source, and different 662 | solutions will be better for different programs; see section 13 for the 663 | specific requirements. 664 | . 665 | You should also get your employer (if you work as a programmer) or school, 666 | if any, to sign a "copyright disclaimer" for the program, if necessary. 667 | For more information on this, and how to apply and follow the GNU AGPL, see 668 | . 669 | -------------------------------------------------------------------------------- /debian/make-helper-overrides.bsh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Copyright (C) 2019 - 2025 ENCRYPTED SUPPORT LLC 4 | ## See the file COPYING for copying conditions. 5 | 6 | genmkfile_lintian_post_opts+=" --suppress-tags file-in-unusual-dir" 7 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 4 | ## See the file COPYING for copying conditions. 5 | 6 | #export DH_VERBOSE=1 7 | 8 | %: 9 | dh $@ 10 | 11 | override_dh_install: 12 | dh_apparmor --profile-name=sandbox-app-launcher 13 | dh_install 14 | 15 | override_dh_installman: 16 | dh_installman $(CURDIR)/auto-generated-man-pages/* 17 | 18 | override_dh_installchangelogs: 19 | dh_installchangelogs changelog.upstream upstream 20 | -------------------------------------------------------------------------------- /debian/sandbox-app-launcher.install: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2020 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | ## This file was generated using genmkfile 'make debinstfile'. 5 | 6 | etc/* 7 | usr/* 8 | -------------------------------------------------------------------------------- /debian/sandbox-app-launcher.links: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | /home/sandbox-app-launcher-appdata/shared /shared 5 | -------------------------------------------------------------------------------- /debian/sandbox-app-launcher.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 4 | ## See the file COPYING for copying conditions. 5 | 6 | if [ -f /usr/libexec/helper-scripts/pre.bsh ]; then 7 | source /usr/libexec/helper-scripts/pre.bsh 8 | fi 9 | 10 | set -e 11 | 12 | true " 13 | ##################################################################### 14 | ## INFO: BEGIN: $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@ 15 | ##################################################################### 16 | " 17 | 18 | main_app_dir="/usr/share/sandbox-app-launcher" 19 | auto_dir="/var/cache/sandbox-app-launcher-autogenerated" 20 | appdata_dir="/home/sandbox-app-launcher-appdata" 21 | shared_dir="${appdata_dir}/shared" 22 | wrapper_script_non_wx="${main_app_dir}/wrapper-script" 23 | wrapper_script_wx="${main_app_dir}/wrapper-script-wx" 24 | 25 | for dir in "${main_app_dir}" "${auto_dir}" "${appdata_dir}"; do 26 | if ! [ -d "${dir}" ]; then 27 | mkdir --parents --mode=755 "${dir}" 28 | fi 29 | done 30 | 31 | if ! [ -d "${shared_dir}" ]; then 32 | mkdir --parents --mode=1777 "${shared_dir}" 33 | fi 34 | 35 | ## Cannot use a symlink due to apparmor issues. 36 | ## https://github.com/Whonix/sandbox-app-launcher/pull/60#pullrequestreview-678111466 37 | cp "${wrapper_script_non_wx}" "${wrapper_script_wx}" 38 | 39 | ## Generate seccomp filter. 40 | compiler_flags="-lseccomp -ldl -D_GNU_SOURCE -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -fstack-protector-all -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now" 41 | 42 | "${main_app_dir}/autogen-seccomp" "${main_app_dir}/seccomp-whitelist" > "${auto_dir}/seccomp.c" 43 | "${main_app_dir}/autogen-seccomp" "${main_app_dir}/seccomp-whitelist-wx" > "${auto_dir}/seccomp-wx.c" 44 | str_replace "seccomp-filter.bpf" "seccomp-filter-wx.bpf" "${auto_dir}/seccomp-wx.c" >/dev/null 45 | 46 | gcc "${auto_dir}/seccomp.c" -o "${auto_dir}/seccomp" ${compiler_flags} 47 | gcc "${auto_dir}/seccomp-wx.c" -o "${auto_dir}/seccomp-wx" ${compiler_flags} 48 | 49 | chmod 700 "${auto_dir}/seccomp" "${auto_dir}/seccomp-wx" 50 | "${auto_dir}/seccomp" 51 | "${auto_dir}/seccomp-wx" 52 | 53 | true "INFO: debhelper beginning here." 54 | 55 | #DEBHELPER# 56 | 57 | true "INFO: Done with debhelper." 58 | 59 | true " 60 | ##################################################################### 61 | ## INFO: END : $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@ 62 | ##################################################################### 63 | " 64 | 65 | ## Explicitly "exit 0", so eventually trapped errors can be ignored. 66 | exit 0 67 | -------------------------------------------------------------------------------- /debian/sandbox-app-launcher.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 4 | ## See the file COPYING for copying conditions. 5 | 6 | if [ -f /usr/libexec/helper-scripts/pre.bsh ]; then 7 | source /usr/libexec/helper-scripts/pre.bsh 8 | fi 9 | 10 | set -e 11 | 12 | true " 13 | ##################################################################### 14 | ## INFO: BEGIN: $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@ 15 | ##################################################################### 16 | " 17 | 18 | rm -rf /var/cache/sandbox-app-launcher-autogenerated 19 | if getent passwd | grep -q "sal-"; then 20 | for user in "$(getent passwd | grep "sal-" | cut -d ":" -f 1)" 21 | do 22 | userdel "${user}" || true 23 | done 24 | fi 25 | 26 | true "INFO: debhelper beginning here." 27 | 28 | #DEBHELPER# 29 | 30 | true "INFO: Done with debhelper." 31 | 32 | true " 33 | ##################################################################### 34 | ## INFO: END : $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@ 35 | ##################################################################### 36 | " 37 | 38 | ## Explicitly "exit 0", so eventually trapped errors can be ignored. 39 | exit 0 40 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | ## https://phabricator.whonix.org/T277 2 | debian-watch-does-not-check-openpgp-signature 3 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | version=4 5 | opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/helper-scripts-$1\.tar\.gz/ \ 6 | https://github.com/Whonix/sandbox-app-launcher/tags .*/v?(\d\S+)\.tar\.gz 7 | -------------------------------------------------------------------------------- /etc/apparmor.d/abstractions/sandbox-app-launcher: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | / r, 5 | 6 | ## Needed for apps to setup further sandboxing like Firefox/Chromium. 7 | capability sys_admin, 8 | capability sys_chroot, 9 | capability sys_ptrace, 10 | 11 | ## Let the app do whatever they want with their own data except 12 | ## executing their own code. 13 | owner @{HOME_DIR}/*/ rw, 14 | owner @{HOME_DIR}/*/** rwlk, 15 | @{SHARED_DIR}/ rw, 16 | @{SHARED_DIR}/** rwlk, 17 | 18 | ## Allow killing unconfined processes. Apps are run as other 19 | ## users anyway so this is safe. 20 | signal (receive) set=(int, term, kill) peer=unconfined, 21 | 22 | ## TODO: Restrict if possible. 23 | unix, 24 | 25 | ## Network access. 26 | ## 27 | ## Only IPv4 TCP traffic is allowed as Whonix 28 | ## disables IPv6 and Tor only supports TCP. 29 | network inet tcp, 30 | 31 | ## Only allow communicating with the D-Bus session bus. 32 | ## This is safe since each app runs as their own user 33 | ## with their own session bus. Allowing communication with 34 | ## the system bus is dangerous because it allows messing 35 | ## with services outside of the sandbox. 36 | dbus bus=session, 37 | 38 | ## rlimit restrictions. 39 | ## 40 | ## Only allow a maximum of 200 processes to prevent things such as 41 | ## fork bombs. 42 | ## TODO: More rlimit restrictions. 43 | set rlimit nproc <= 200, 44 | 45 | ## Programs and libraries. 46 | ## 47 | ## All programs and libraries are read-only to prevent malware from 48 | ## compromising a specific program. Updates will be handled by APT. 49 | ## TODO: Environment scrubbing. 50 | /usr/ r, 51 | /{,usr/,usr/local/}{,s}bin/ r, 52 | /{,usr/,usr/local/}{,s}bin/** rpix, 53 | /{,usr/,usr/local/}lib{,32,64}/ r, 54 | /{,usr/,usr/local/}lib{,32,64}/** rmpix, 55 | /usr/{,local/}{share,include}/ r, 56 | /usr/{,local/}{share,include}/** rpix, 57 | ## /usr/lib/ is mounted read-only. 58 | deny /usr/lib/python3/dist-packages/*/__pycache__/{,**} w, 59 | 60 | ## Sysfs access. 61 | @{sys}/ r, 62 | @{sys}/devices/ r, 63 | @{sys}/devices/**/{uevent,config} r, 64 | @{sys}/devices/pci[0-9]*/**/{,resource,boot_vga,class,vendor,device,irq,revision,subsystem_vendor,port_no} r, 65 | @{sys}/devices/pci[0-9]*/**/drm/**/{,enabled,status} r, 66 | @{sys}/devices/pci[0-9]*/**/sound/**/pcm_class r, 67 | @{sys}/devices/pci[0-9]*/**/backlight/**/* r, 68 | @{sys}/devices/virtual/tty/{,tty[0-9]*/active,console/active} r, 69 | @{sys}/devices/virtual/dmi/id/{sys,board,bios}_vendor r, 70 | @{sys}/devices/virtual/dmi/id/product_name r, 71 | @{sys}/devices/system/node/{,node[0-9]*/meminfo} r, 72 | @{sys}/devices/system/cpu/{,present,online,cpu[0-9]*/cache/index2/size} r, 73 | @{sys}/class/{,tty,input,drm,sound}/ r, 74 | @{sys}/bus/ r, 75 | @{sys}/bus/pci/devices/ r, 76 | @{sys}/fs/cgroup/** rw, 77 | 78 | ## Procfs access. 79 | ## TODO: Restrict access further. 80 | @{PROC}/ r, 81 | owner @{PROC}/@{pid}/{cgroup,cmdline,comm,sessionid,mounts,stat,status,sched,maps,auxv,attr/current,fd/,environ,limits,mountinfo,task/,task/*/stat,task/*/status,fdinfo/*,mem} r, 82 | owner @{PROC}/@{pid}/{setgroups,gid_map,uid_map,attr/exec,oom_score_adj} rw, 83 | @{PROC}/{stat,cpuinfo,filesystems,meminfo,swaps,uptime} r, 84 | @{PROC}/sys/** r, 85 | ## TODO: Review. 86 | deny @{PROC}/@{pids}/{statm,smaps} r, 87 | deny @{PROC}/@{pids}/net/{,**} r, 88 | 89 | ## Tmpfs access. 90 | ## 91 | ## Read-only access is given to files the user is not an owner of 92 | ## and read-write access is given to files the user is owner of. 93 | /{,var/}tmp/{,**} r, 94 | owner /{,var/}tmp/ rw, 95 | owner /{,var/}tmp/** rwlk, 96 | 97 | ## Config files. 98 | /etc/{,**} r, 99 | 100 | ## Device access. 101 | /dev/ r, 102 | /dev/console r, 103 | /dev/random rw, 104 | /dev/urandom rw, 105 | /dev/null rw, 106 | /dev/zero rw, 107 | /dev/full rw, 108 | owner /dev/stdin rw, 109 | owner /dev/stdout r, 110 | owner /dev/stderr rw, 111 | /dev/tty rw, 112 | owner /dev/ptmx rw, 113 | /dev/pts/ r, 114 | owner /dev/pts/* rw, 115 | owner /dev/shm/ r, 116 | owner /dev/shm/** rw, 117 | ## Access to these devices are handled by bubblewrap. 118 | /dev/video* rw, 119 | /dev/snd/ r, 120 | /dev/snd/** rw, 121 | 122 | ## /var and /run access. 123 | ## TODO: Remove write permissions. Should be mounted read-only anyway. 124 | /var/{,lib,cache}/ r, 125 | /var/lib/** r, 126 | /var/lib/command-not-found/commands.db rwk, 127 | /var/cache/** rwl, 128 | owner /var/lib/{,**} rw, 129 | /{,var/}run/ r, 130 | /{,var/}run/** rw, 131 | /{,var/}run/shm/** rwl, 132 | owner /{,var/}run/** rwk, 133 | 134 | ## Can leak some important kernel information such as kernel pointers. 135 | deny /{,usr/}lib/modules/{,**} rw, 136 | deny /**vmlinu{,z,x}* rw, 137 | deny /**System.map* rw, 138 | 139 | # Site-specific additions and overrides. See local/README for details. 140 | #include 141 | -------------------------------------------------------------------------------- /etc/apparmor.d/sandbox-app-launcher: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | #include 5 | 6 | @{WRAPPER}=/usr/share/sandbox-app-launcher/wrapper-script 7 | @{WRAPPER_WX}=@{WRAPPER}-wx 8 | @{HOME_DIR}=/home/sandbox-app-launcher-appdata 9 | @{SHARED_DIR}=@{HOME_DIR}/shared /shared 10 | 11 | profile sandbox-app-launcher @{WRAPPER} flags=(attach_disconnected) { 12 | #include 13 | 14 | ## Allow us to send ourselves signals. 15 | signal peer=sandbox-app-launcher, 16 | 17 | ## Allow us to ptrace ourselves. 18 | ptrace (read, readby, tracedby) peer=sandbox-app-launcher, 19 | 20 | ## Deny W^X violations. 21 | deny @{HOME_DIR}/*/** xm, 22 | deny @{SHARED_DIR}/** xm, 23 | deny /{,var/}tmp/** xm, 24 | deny /dev/shm/** m, 25 | deny @{sys}/fs/cgroup/** m, 26 | } 27 | 28 | profile sandbox-app-launcher-wx @{WRAPPER_WX} flags=(attach_disconnected) { 29 | #include 30 | 31 | ## Allow us to send ourselves signals. 32 | signal peer=sandbox-app-launcher-wx, 33 | 34 | ## Allow us to ptrace ourselves. 35 | ptrace (read, readby, tracedby) peer=sandbox-app-launcher-wx, 36 | 37 | ## Allow W^X violations. 38 | owner @{HOME_DIR}/*/** rwmlkix, 39 | @{SHARED_DIR}/** rwmlkix, 40 | owner /{,var/}tmp/** rwmlkix, 41 | owner /dev/shm/** rwm, 42 | @{sys}/fs/cgroup/** rwm, 43 | } 44 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/chromium.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=yes 5 | allow_webcam=yes 6 | allow_mic=yes 7 | shared_storage=read-write 8 | allow_dynamic_native_code_exec=yes 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/firefox.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=yes 5 | allow_webcam=yes 6 | allow_mic=yes 7 | shared_storage=read-write 8 | allow_dynamic_native_code_exec=yes 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/hexchat.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=yes 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=no 8 | allow_dynamic_native_code_exec=no 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/keepassxc.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | ## https://keepassxc.org/docs/#faq-security-network 5 | allow_net=yes 6 | allow_webcam=no 7 | allow_mic=no 8 | shared_storage=read-write 9 | allow_dynamic_native_code_exec=no 10 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/libreoffice.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=no 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=read-write 8 | allow_dynamic_native_code_exec=yes 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/mousepad.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=no 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=read-write 8 | allow_dynamic_native_code_exec=no 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/onionshare.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=yes 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=read-only 8 | allow_dynamic_native_code_exec=no 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/qtox.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=yes 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=read-only 8 | allow_dynamic_native_code_exec=no 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/ristretto.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=no 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=read-only 8 | allow_dynamic_native_code_exec=no 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/thunderbird.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=yes 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=read-write 8 | allow_dynamic_native_code_exec=yes 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/torbrowser.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=yes 5 | allow_webcam=yes 6 | allow_mic=yes 7 | shared_storage=read-write 8 | allow_dynamic_native_code_exec=yes 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/vlc.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=yes 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=read-write 8 | allow_dynamic_native_code_exec=no 9 | -------------------------------------------------------------------------------- /etc/sandbox-app-launcher/xpdf.conf: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | allow_net=no 5 | allow_webcam=no 6 | allow_mic=no 7 | shared_storage=read-only 8 | allow_dynamic_native_code_exec=no 9 | -------------------------------------------------------------------------------- /man/sandbox-app-launcher.8.ronn: -------------------------------------------------------------------------------- 1 | sandbox-app-launcher(8) -- start application in sandbox 2 | ============================================= 3 | 4 | 8 | 9 | ## SYNOPSIS 10 | `sandbox-app-launcher` application-name 11 | 12 | ## DESCRIPTION 13 | TODO 14 | 15 | ## EXAMPLE 16 | TODO 17 | 18 | ## AUTHOR 19 | This man page has been written by Patrick Schleizer (adrelanos@whonix.org). 20 | -------------------------------------------------------------------------------- /tests/W^X/w^x-mmap.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | W^X - mmap(), mmap2() 4 | 5 | A memory mapping that is both writable and executable at the same time (PROT_WRITE|PROT_EXEC) 6 | is dangerous because an attacker can write arbitrary code there to be executed. 7 | 8 | This tries to create a memory mapping that is both writable and executable. 9 | This also tests for mmap2() (an alternative to mmap()). 10 | 11 | The seccomp filter enforces strict W^X restrictions that should prevent this. 12 | 13 | Expected output: 14 | 15 | Bad system call (core dumped) 16 | 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | int main() { 24 | mmap(NULL, 128, PROT_WRITE|PROT_EXEC, MAP_PRIVATE, -1, 0); 25 | mmap2(NULL, 128, PROT_WRITE|PROT_EXEC, MAP_PRIVATE, -1, 0); 26 | } 27 | -------------------------------------------------------------------------------- /tests/W^X/w^x-mprotect.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | W^X - mprotect(), pkey_mprotect() 4 | 5 | An attacker can write arbitary code to a writable memory mapping and then make the 6 | mapping executable via mprotect(). This can bypass any mmap() restrictions. 7 | 8 | This attempts to create a writable memory mapping then mprotect() it to executable. 9 | This also tests for pkey_mprotect() (an alternative to mprotect()). 10 | 11 | The seccomp filter enforces strict W^X restrictions that should prevent this. 12 | 13 | Expected output: 14 | 15 | Bad system call (core dumped) 16 | 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | int main() { 23 | char* test = malloc(128); 24 | mmap(test, 128, PROT_WRITE, MAP_PRIVATE, -1, 0); 25 | test[0] = '\xcc'; 26 | mprotect(test, 128, PROT_READ|PROT_EXEC); 27 | pkey_mprotect(test, 128, PROT_READ|PROT_EXEC); 28 | } 29 | -------------------------------------------------------------------------------- /tests/W^X/w^x-shmat.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | W^X - shmat() 4 | 5 | The shmat() syscall can be used to map shared memory segments as executable. 6 | 7 | The seccomp filter enforces strict W^X restrictions that should prevent this. 8 | 9 | Expected output: 10 | 11 | Bad system call (core dumped) 12 | 13 | */ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | int main() { 20 | shmat(1, NULL, SHM_EXEC); 21 | } 22 | -------------------------------------------------------------------------------- /tests/exec-elf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Test executing an ELF binary. This will be stopped by AppArmor's execution restrictions. 4 | ## 5 | ## Expected output: 6 | ## 7 | ## bash: ~/exec-elf: Permission denied 8 | ## 9 | echo "#include 10 | int main () { 11 | printf(\"test\"); 12 | }" > ~/exec-elf.c 13 | gcc ~/exec-elf.c -o ~/exec-elf 14 | ~/exec-elf 15 | -------------------------------------------------------------------------------- /tests/tiocsti.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | TIOCSTI is a common sandbox escape method. The following code attempts to call the TIOCSTI ioctl 4 | and should be stopped by the seccomp filter. Even if the ioctl was allowed in the seccomp filter, 5 | bubblewrap's "--new-session" flag would prevent it from being used to escape. 6 | 7 | Expected output with seccomp: 8 | 9 | Bad system call (core dumped) 10 | 11 | Expected output without seccomp (with just --new-session): 12 | 13 | normal TIOCSTI: -1 (Operation not permitted) 14 | high-bit-set TIOCSTI: -1 (Operation not permitted) 15 | 16 | https://www.exploit-db.com/exploits/46594 17 | 18 | */ 19 | 20 | #define _GNU_SOURCE 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | static int ioctl64(int fd, unsigned long nr, void *arg) { 29 | errno = 0; 30 | return syscall(__NR_ioctl, fd, nr, arg); 31 | } 32 | 33 | int main(void) { 34 | int res; 35 | char pushmeback = '#'; 36 | res = ioctl64(0, TIOCSTI, &pushmeback); 37 | printf("normal TIOCSTI: %d (%m)\n", res); 38 | res = ioctl64(0, TIOCSTI | (1UL<<32), &pushmeback); 39 | printf("high-bit-set TIOCSTI: %d (%m)\n", res); 40 | } 41 | -------------------------------------------------------------------------------- /usr/bin/sandbox-app-launcher: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 4 | ## See the file COPYING for copying conditions. 5 | 6 | set -e 7 | 8 | while : 9 | do 10 | case $1 in 11 | setup) 12 | setup_sandbox="1" 13 | shift 14 | break 15 | ;; 16 | start) 17 | start_program="1" 18 | shift 19 | break 20 | ;; 21 | remove) 22 | remove="1" 23 | shift 24 | break 25 | ;; 26 | list) 27 | echo -e "Currently configured sandboxes:\n" 28 | getent passwd | grep "sal" | sed -e 's/:.*//g' | str_replace "sal-" "" 29 | exit 30 | ;; 31 | help) 32 | echo "Usage: sandbox-app-launcher [OPTION] [APPLICATION] 33 | 34 | setup Setup the sandbox for the application. 35 | start Execute the application within the sandbox. 36 | remove Remove all application data and configuration files. 37 | list List all currently configured sandboxes. 38 | 39 | Examples: 40 | sandbox-app-launcher setup firefox 41 | sandbox-app-launcher start firefox 42 | sandbox-app-launcher remove firefox 43 | sandbox-app-launcher list" 44 | exit 45 | ;; 46 | *) 47 | echo "ERROR: Invalid argument. See the 'help' command for details." 48 | exit 1 49 | ;; 50 | esac 51 | done 52 | 53 | app_name="${1}" 54 | shift 1 55 | : ${app_path:="$(type -P "${app_name}" || true)"} 56 | 57 | main_app_dir="/usr/share/sandbox-app-launcher" 58 | auto_dir="/var/cache/sandbox-app-launcher-autogenerated" 59 | appdata_dir="/home/sandbox-app-launcher-appdata" 60 | app_user="sal-${app_name}" 61 | app_homedir="${appdata_dir}/${app_name}" 62 | seccomp_filter_non_wx="${auto_dir}/seccomp-filter.bpf" 63 | seccomp_filter_wx="${auto_dir}/seccomp-filter-wx.bpf" 64 | shared_dir="${appdata_dir}/shared" 65 | wrapper_script_non_wx="${main_app_dir}/wrapper-script" 66 | wrapper_script_wx="${main_app_dir}/wrapper-script-wx" 67 | 68 | ## proper whitespace handling 69 | ## https://www.whonix.org/wiki/Dev/bash 70 | unset bwrap_args 71 | declare -a bwrap_args 72 | 73 | if ! [[ "${app_name}" =~ [0-9a-zA-Z/] ]]; then 74 | echo "ERROR: Invalid character in app_name." >&2 75 | exit 1 76 | fi 77 | 78 | if [ "${app_name}" = "torbrowser" ]; then 79 | app_path="${app_homedir}/.tb/tor-browser/Browser/start-tor-browser" 80 | fi 81 | 82 | if ! [ -x "${app_path}" ] && ! [ "${app_name}" = "torbrowser" ]; then 83 | echo "ERROR: Could not find '${app_name}' in \$PATH. Is it installed?" >&2 84 | exit 1 85 | fi 86 | 87 | if ! [[ "${app_path}" =~ [0-9a-zA-Z/] ]]; then 88 | echo "ERROR: Invalid character in app_path." >&2 89 | exit 1 90 | fi 91 | 92 | if [ "${app_name}" = "shared" ]; then 93 | echo "ERROR: The app name cannot be 'shared'." >&2 94 | exit 1 95 | fi 96 | 97 | if [ -f "/etc/sandbox-app-launcher/${app_name}.conf" ]; then 98 | . "/etc/sandbox-app-launcher/${app_name}.conf" 99 | fi 100 | 101 | ## Optionally allow dynamic native code execution. 102 | ## 103 | ## This allows creating memory mappings that are both 104 | ## writable and executable, allows transitioning a 105 | ## writable memory mapping to executable and allows 106 | ## executing programs from writable directories i.e. 107 | ## violating W^X. 108 | ## 109 | ## This is generally a security issue since it allows an 110 | ## attacker to execute new arbitrary code so preventing this 111 | ## will force the attacker to use the already existing code 112 | ## (ROP/JOP) which is far more limited. 113 | ## 114 | ## Although, some things require this such as JIT engines in 115 | ## browsers so it must be optional. 116 | if [ "${allow_dynamic_native_code_exec}" = "yes" ]; then 117 | seccomp_filter="${seccomp_filter_wx}" 118 | wrapper_script="${wrapper_script_wx}" 119 | else 120 | seccomp_filter="${seccomp_filter_non_wx}" 121 | wrapper_script="${wrapper_script_non_wx}" 122 | fi 123 | 124 | if [ "$(id -u)" = "0" ]; then 125 | sal_is_run_with_root=true 126 | fi 127 | 128 | error_handler() { 129 | echo " 130 | ## sandbox-app-launcher BUG. 131 | ## BASH_COMMAND: ${BASH_COMMAND} 132 | ## Please report this BUG! 133 | " >&2 134 | exit 1 135 | } 136 | 137 | trap "error_handler" ERR 138 | 139 | kill_processes_inside_sandbox() { 140 | pids="$(pgrep --uid="${app_user}" 2>/dev/null)" || true 141 | if [ "$pids" = "" ]; then 142 | return 0 143 | fi 144 | 145 | ## Don't leave any left-over processes such as the D-Bus daemon. 146 | killall -9 -u "${app_user}" 147 | 148 | ## Cannot use bash built-in `wait` since that would fail if command is run 149 | ## from a different shell. 150 | ## /usr/bin/sandbox-app-launcher: line 129: wait: pid 12973 is not a child of this shell 151 | #wait $pids 152 | 153 | ## This is not the cleanest way. Would be better if there was a tool 154 | ## that can block until a list of pids has terminated to avoid a hardcoded 155 | ## `sleep 0.2`. 156 | while true ; do 157 | ## `ps` will exit 0 if at least one pid is still running. 158 | ## `ps` will exit 1 if no pid not even one is running. 159 | ## Examples: 160 | ## 161 | ## `ps --no-header -p 1` -> exit code: 0 162 | ## 163 | ## pid 1 really exists. 164 | ## pid 555555 does not exist. 165 | ## `ps --no-header -p 1 555555` -> exit code: 0 166 | ## ps still exit 0. 167 | if ! ps --no-header -p $pids &>/dev/null ; then 168 | break 169 | fi 170 | sleep 0.2 & 171 | ## Non-blocking. Process event loop such as signals. 172 | wait "$!" 173 | done 174 | } 175 | 176 | run_if_root() { 177 | if [ "${sal_is_run_with_root}" = "true" ]; then 178 | "${@}" 179 | else 180 | echo "ERROR: The setup for this program is incomplete. To fix, please execute: 181 | 182 | sudo sandbox-app-launcher setup ${app_name} 183 | 184 | (Debugging information: ${@})" >&2 185 | exit 1 186 | fi 187 | } 188 | 189 | setup() { 190 | if ! [ "${sal_is_run_with_root}" = "true" ]; then 191 | echo "ERROR: The setup must be run as root (sudo)." >&2 192 | exit 1 193 | fi 194 | setup_or_check 195 | echo "INFO: Done, setup complete, OK." 196 | } 197 | 198 | setup_or_check() { 199 | ## Some folders or files might be non-existing in case SAL is used outside of 200 | ## or ported to other Linux distributions not using Debian package maintainer 201 | ## script: debian/sandbox-app-launcher.postinst 202 | ## Might also happen in other corner cases such as incomplete installation 203 | ## (due to power loss, freeze during initial installation / upgrade or user 204 | ## error deleting files). Better to check and potentially error out early 205 | ## than getting difficult to understand error messages later. 206 | 207 | for dir in "${main_app_dir}" "${auto_dir}" "${appdata_dir}"; do 208 | ## Check if the required directories exist. 209 | if ! [ -d "${dir}" ]; then 210 | echo "ERROR: Directory '${dir}' does not exist. This package was not installed properly." >&2 211 | exit 1 212 | fi 213 | if ! [ "$(stat -c %a "${dir}")" = "755" ]; then 214 | ## Fix permissions. 215 | run_if_root chmod 755 "${dir}" 216 | fi 217 | done 218 | 219 | ## Check if the shared directory exists. 220 | if ! [ -d "${shared_dir}" ]; then 221 | echo "ERROR: Directory '${shared_dir}' does not exist. This package was not installed properly." >&2 222 | exit 1 223 | fi 224 | if ! [ "$(stat -c %a "${shared_dir}")" = "1777" ]; then 225 | ## Fix permissions. 226 | run_if_root chmod 1777 "${shared_dir}" 227 | fi 228 | 229 | ## Check if the second wrapper script exists. 230 | if ! [ -f "${wrapper_script}" ]; then 231 | echo "ERROR: File '${wrapper_script}' does not exist. This package was not installed properly." >&2 232 | exit 1 233 | fi 234 | 235 | ## Create the user that the sandboxed application will run as. 236 | if ! getent passwd | sed -e 's/:.*//g' | grep -qw "${app_user}"; then 237 | ## Use 'adduser' on Debian or Ubuntu systems but 'useradd' on other systems 238 | ## for portability. 239 | ## https://github.com/madaidan/sandbox-app-launcher/issues/9 240 | if grep --quiet --invert-match --extended-regexp 'NAME="Debian|NAME="Ubuntu' /etc/os-release; then 241 | run_if_root adduser --home "${app_homedir}" --no-create-home --disabled-login --comment "" "${app_user}" >/dev/null 242 | else 243 | run_if_root useradd --home-dir "${app_homedir}" --no-create-home "${app_user}" >/dev/null 244 | fi 245 | fi 246 | 247 | if ! [ -d "${app_homedir}" ]; then 248 | run_if_root mkdir --parents --mode=700 "${app_homedir}" 249 | fi 250 | 251 | if ! [ "$(stat -c "%U" "${app_homedir}")" = "${app_user}" ]; then 252 | run_if_root chown --recursive "${app_user}" "${app_homedir}" 253 | fi 254 | 255 | if ! [ "$(stat -c %a "${app_homedir}")" = "700" ]; then 256 | ## command: 257 | ## find /home/sandbox-app-launcher-appdata/torbrowser/.tb/tor-browser -executable -type f 258 | ## output: 259 | ## /home/sandbox-app-launcher-appdata/torbrowser/.tb/tor-browser/start-tor-browser.desktop 260 | ## /home/sandbox-app-launcher-appdata/torbrowser/.tb/tor-browser/Browser/libmozavcodec.so 261 | ## ... 262 | #run_if_root chmod --recursive 700 "${app_homedir}" 263 | ## Therefore do not use --recursive. 264 | run_if_root chmod 700 "${app_homedir}" 265 | fi 266 | 267 | ## https://forums.whonix.org/t/system-wide-sandboxing-framework-sandbox-app-launcher/9008/311 268 | if ! test -f /etc/machine-id ; then 269 | run_if_root touch /etc/machine-id 270 | fi 271 | } 272 | 273 | run_program() { 274 | setup_or_check 275 | 276 | ## TODO: X11 sandbox - not needed if we switch to wayland 277 | ## TODO: IPC namespace 278 | ## TODO: Network namespace - probably via ip netns 279 | ## TODO: Don't preserve the environment - env -i 280 | 281 | ## Optionally remove network access by creating an empty net namespace. 282 | if [ "${allow_net}" = "no" ]; then 283 | bwrap_args+=("--unshare-net") 284 | fi 285 | 286 | ## Optionally allow webcam access. 287 | if [ "${allow_webcam}" = "yes" ]; then 288 | for device in /dev/video* 289 | do 290 | if [ -f "${device}" ]; then 291 | bwrap_args+=("--dev-bind-try") 292 | bwrap_args+=("${device}") 293 | bwrap_args+=("${device}") 294 | fi 295 | done 296 | fi 297 | 298 | ## Optionally allow microphone access. 299 | if [ "${allow_mic}" = "yes" ]; then 300 | bwrap_args+=("--dev-bind-try") 301 | bwrap_args+=("/dev/snd") 302 | bwrap_args+=("/dev/snd") 303 | fi 304 | 305 | ## Shared storage. 306 | if [ "${shared_storage}" = "read-write" ]; then 307 | bwrap_args+=("--bind") 308 | bwrap_args+=("${shared_dir}") 309 | bwrap_args+=("${shared_dir}") 310 | bwrap_args+=("--bind") 311 | bwrap_args+=("/shared") 312 | bwrap_args+=("/shared") 313 | elif [ "${shared_storage}" = "read-only" ]; then 314 | bwrap_args+=("--ro-bind") 315 | bwrap_args+=("${shared_dir}") 316 | bwrap_args+=("${shared_dir}") 317 | bwrap_args+=("--ro-bind") 318 | bwrap_args+=("/shared") 319 | bwrap_args+=("/shared") 320 | fi 321 | 322 | ## Install Tor Browser. 323 | if [ "${app_name}" = "torbrowser" ]; then 324 | if ! [ -d "${app_homedir}/.tb" ]; then 325 | ## Use tb-starter (by Whonix developers) to install Tor Browser. 326 | sudo --set-home --user="${app_user}" HOME="${app_homedir}" tb_no_start=true tb_installer_started_by_sandbox_app_launcher=true torbrowser 327 | fi 328 | bwrap_args+=("--ro-bind-try") 329 | bwrap_args+=("/run/anon-ws-disable-stacked-tor/127.0.0.1_9150.sock") 330 | bwrap_args+=("/run/anon-ws-disable-stacked-tor/127.0.0.1_9150.sock") 331 | bwrap_args+=("--ro-bind-try") 332 | bwrap_args+=("/run/anon-ws-disable-stacked-tor/127.0.0.1_9151.sock") 333 | bwrap_args+=("/run/anon-ws-disable-stacked-tor/127.0.0.1_9151.sock") 334 | fi 335 | 336 | true "{bwrap_args[@]}:" 337 | true "${bwrap_args[@]}" 338 | true "..." 339 | ## XXX: bwrap_args does not have proper whitespace support 340 | ## A bash associative array cannot be passed to another script. 341 | bwrap_args_string="${bwrap_args[@]}" 342 | true "..." 343 | true "bwrap_args_string:" 344 | true "$bwrap_args_string" 345 | 346 | ## Debugging. 347 | if [ -o xtrace ]; then 348 | ## read by wrapper_script 349 | sandbox_app_launcher_debug=true 350 | else 351 | sandbox_app_launcher_debug=false 352 | fi 353 | 354 | ## variables app_path and sandbox_app_launcher_debug are read by wrapper_script. 355 | 356 | ## Passing file descriptors to brwap is difficult because sudo closes file 357 | ## descriptors with a number greater than 3. This can be overwritten in 358 | ## theory using sudo with parameter -C but that would require permitting this 359 | ## in global sudo configuration policy with closefrom_override which has 360 | ## unknown security impact. Hence, file descriptors are passed in file: 361 | ## /usr/share/sandbox-app-launcher/bwrap-wrapper 362 | 363 | sudo \ 364 | --set-home \ 365 | --user="${app_user}" \ 366 | sandbox_app_launcher_debug="${sandbox_app_launcher_debug}" \ 367 | app_path="${app_path}" \ 368 | app_user="${app_user}" \ 369 | main_app_dir="${main_app_dir}" \ 370 | app_homedir="${app_homedir}" \ 371 | wrapper_script="${wrapper_script}" \ 372 | seccomp_filter="${seccomp_filter}" \ 373 | bwrap_args="$bwrap_args_string" \ 374 | /usr/share/sandbox-app-launcher/bwrap-wrapper "$@" 375 | 376 | kill_processes_inside_sandbox 377 | 378 | true "OK" 379 | } 380 | 381 | remove_app() { 382 | if ! [ "${sal_is_run_with_root}" = "true" ]; then 383 | echo "ERROR: The removal process must be run as root." >&2 384 | exit 1 385 | fi 386 | 387 | kill_processes_inside_sandbox 388 | 389 | if getent passwd | grep -q "${app_user}"; then 390 | userdel --remove --force "${app_user}" 391 | else 392 | echo "INFO: User '${app_user}' does not exist, probably already removed earlier, OK." 393 | fi 394 | 395 | echo "INFO: Done, removal complete, OK." 396 | } 397 | 398 | if [ "${setup_sandbox}" = "1" ]; then 399 | setup 400 | elif [ "${start_program}" = "1" ]; then 401 | if sudo --set-home --user="${app_user}" test -d "${app_homedir}" ; then 402 | run_program "${@}" 403 | else 404 | echo "ERROR: The sandbox for this program has not been set up yet. Please execute: 405 | 406 | sudo sandbox-app-launcher setup ${app_name}" >&2 407 | fi 408 | elif [ "${remove}" = "1" ]; then 409 | remove_app 410 | fi 411 | -------------------------------------------------------------------------------- /usr/share/sandbox-app-launcher/autogen-seccomp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 4 | ## See the file COPYING for copying conditions. 5 | 6 | set -e 7 | 8 | seccomp_filter_path="/var/cache/sandbox-app-launcher-autogenerated/seccomp-filter" 9 | whitelist_file="${@}" 10 | 11 | if [ "${whitelist_file}" = "" ]; then 12 | echo "ERROR: No file was specified." 13 | exit 1 14 | fi 15 | 16 | if ! [ -f "${whitelist_file}" ]; then 17 | echo "ERROR: File does not exist: '${whitelist_file}'" 18 | exit 1 19 | fi 20 | 21 | generate_filter() { 22 | while read -r syscall; do 23 | actual_syscall="" 24 | arg_num="" 25 | syscall_arg="" 26 | arg_rule="" 27 | 28 | if [[ "${syscall}" =~ ^# ]]; then 29 | continue 30 | fi 31 | 32 | if [ "${syscall}" = "" ]; then 33 | continue 34 | fi 35 | 36 | if ! [[ "${syscall}" =~ [0-9a-zA-Z/] ]]; then 37 | echo "ERROR: Entry contains invalid character: '${syscall}'" 38 | continue 39 | fi 40 | 41 | if ! read -r actual_syscall arg_num syscall_arg <<< "${syscall}"; then 42 | echo "ERROR: Cannot parse: '${syscall}'" 43 | continue 44 | fi 45 | 46 | if [ "${actual_syscall}" = "@include" ]; then 47 | generate_filter "${arg_num}" 48 | continue 49 | fi 50 | 51 | if [ "${arg_num}" = "" ]; then 52 | whitelisted_syscalls+=" ALLOW_SYSCALL (${syscall}); 53 | " 54 | continue 55 | fi 56 | 57 | if ! [ "${arg_num}" = "0" ] && ! [ "${arg_num}" = "1" ] && ! [ "${arg_num}" = "2" ]; then 58 | echo "ERROR: Not a valid argument number: ${arg_num}" 59 | continue 60 | fi 61 | 62 | if [ "${actual_syscall}" = "ioctl" ]; then 63 | ## TODO: Can we remove this exception without opening up holes? 64 | whitelisted_syscalls+=" ALLOW_IOCTL (${syscall_arg}); 65 | " 66 | else 67 | whitelisted_syscalls+=" ALLOW_ARG${arg_num} (${actual_syscall}, ${syscall_arg}); 68 | " 69 | fi 70 | done < "${1}" 71 | } 72 | 73 | generate_filter "${whitelist_file}" 74 | 75 | echo "#include 76 | #include 77 | #include 78 | #include 79 | #include 80 | #include 81 | #include 82 | #include 83 | #include 84 | #include 85 | #include 86 | #include 87 | 88 | #define ALLOW_SYSCALL(call) { if (seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS(call), 0) < 0) goto out; } 89 | #define ALLOW_IOCTL(call) { if (seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS(ioctl), 1, SCMP_A1 (SCMP_CMP_MASKED_EQ, 0xFFFFFFFFu, (int) call), 0) < 0) goto out; } 90 | 91 | #define ALLOW_ARG0(call, arg) { if (seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS(call), 1, SCMP_A0(SCMP_CMP_EQ, arg), 0) < 0) goto out; } 92 | #define ALLOW_ARG1(call, arg) { if (seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS(call), 1, SCMP_A1(SCMP_CMP_EQ, arg), 0) < 0) goto out; } 93 | #define ALLOW_ARG2(call, arg) { if (seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS(call), 1, SCMP_A2(SCMP_CMP_EQ, arg), 0) < 0) goto out; } 94 | 95 | int main(int argc, char *argv[]) 96 | { 97 | int rc = -1; 98 | scmp_filter_ctx ctx; 99 | int filter_fd; 100 | char *filter_path = \"${seccomp_filter_path}.bpf\"; 101 | 102 | ctx = seccomp_init(SCMP_ACT_KILL); 103 | if (ctx == NULL) 104 | goto out; 105 | 106 | /* Whitelist of syscalls */ 107 | ${whitelisted_syscalls} 108 | filter_fd = open(filter_path, O_CREAT | O_WRONLY, 0644); 109 | if (filter_fd == -1) { 110 | rc = -errno; 111 | goto out; 112 | } 113 | 114 | rc = seccomp_export_bpf(ctx, filter_fd); 115 | if (rc < 0) { 116 | close(filter_fd); 117 | goto out; 118 | } 119 | close(filter_fd); 120 | 121 | 122 | out: 123 | seccomp_release(ctx); 124 | return -rc; 125 | }" 126 | -------------------------------------------------------------------------------- /usr/share/sandbox-app-launcher/bwrap-wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Copyright (C) 2021 - 2025 ENCRYPTED SUPPORT LLC 4 | ## See the file COPYING for copying conditions. 5 | 6 | if [ "$sandbox_app_launcher_debug" = "true" ]; then 7 | set -x 8 | fi 9 | 10 | true "####################" 11 | true "This script is currently being executed: $0" 12 | true "####################" 13 | true "bwrap_args:" 14 | true "$bwrap_args" 15 | true "..." 16 | true "\$@" 17 | true "$@" 18 | 19 | ## XXX: bwrap_args does not have proper whitespace support 20 | 21 | bwrap \ 22 | --ro-bind /bin /bin \ 23 | --ro-bind /usr/bin /usr/bin \ 24 | --ro-bind /lib /lib \ 25 | --ro-bind-try /lib32 /lib32 \ 26 | --ro-bind-try /lib64 /lib64 \ 27 | --ro-bind /usr/lib /usr/lib \ 28 | --ro-bind-try /usr/libexec /usr/libexec \ 29 | --ro-bind-try /usr/local/lib /usr/local/lib \ 30 | --ro-bind /usr/share /usr/share \ 31 | --ro-bind-try /usr/local/share /usr/local/share \ 32 | --ro-bind /usr/include /usr/include \ 33 | --ro-bind /etc /etc \ 34 | --ro-bind-data 10 /etc/passwd \ 35 | --ro-bind-data 11 /etc/group \ 36 | --ro-bind "${main_app_dir}/machine-id" "/etc/machine-id" \ 37 | --ro-bind /var/lib /var/lib \ 38 | --tmpfs /var/lib/dbus \ 39 | --ro-bind "${main_app_dir}/machine-id" "/var/lib/dbus/machine-id" \ 40 | --ro-bind /sys/devices /sys/devices \ 41 | --ro-bind /sys/class /sys/class \ 42 | --ro-bind /sys/bus /sys/bus \ 43 | --ro-bind /sys/fs/cgroup /sys/fs/cgroup \ 44 | --bind "${app_homedir}" "${app_homedir}" \ 45 | --proc /proc \ 46 | --tmpfs /tmp \ 47 | --ro-bind-try /tmp/.X11-unix /tmp/.X11-unix \ 48 | --tmpfs /var/tmp \ 49 | --tmpfs /var/cache \ 50 | --ro-bind "${wrapper_script}" "${wrapper_script}" \ 51 | --ro-bind "${app_path}" "${app_path}" \ 52 | --tmpfs /run \ 53 | --symlink /run /var/run \ 54 | --dev /dev \ 55 | --chdir "${app_homedir}" \ 56 | --setenv HOME "${app_homedir}" \ 57 | --setenv USER "${app_user}" \ 58 | --setenv LOGNAME "${app_user}" \ 59 | --setenv XAUTHORITY "${app_homedir}/.Xauthority" \ 60 | --setenv SHELL /sbin/nologin \ 61 | --setenv started_by_sandbox_app_launcher true \ 62 | --unsetenv SUDO_USER \ 63 | --unsetenv SUDO_UID \ 64 | --unsetenv SUDO_GID \ 65 | --unsetenv SUDO_COMMAND \ 66 | --unsetenv OLDPWD \ 67 | --unsetenv MAIL \ 68 | --unshare-pid \ 69 | --unshare-cgroup \ 70 | --unshare-uts \ 71 | --hostname host \ 72 | --new-session \ 73 | --cap-drop all \ 74 | --seccomp 12 \ 75 | 10< <(getent passwd root "${app_user}") \ 76 | 11< <(getent group root "${app_user}") \ 77 | 12< "${seccomp_filter}" \ 78 | ${bwrap_args} \ 79 | "${wrapper_script}" "$@" 80 | -------------------------------------------------------------------------------- /usr/share/sandbox-app-launcher/machine-id: -------------------------------------------------------------------------------- 1 | b08dfa6083e7567a1921a715000001fb 2 | -------------------------------------------------------------------------------- /usr/share/sandbox-app-launcher/seccomp-whitelist: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | ## Seccomp whitelist. 5 | ## 6 | ## Syntax: 7 | ## [syscall] [argument number] [argument] 8 | 9 | _llseek 10 | _newselect 11 | accept 12 | accept4 13 | access 14 | alarm 15 | arch_prctl 16 | bind 17 | brk 18 | cacheflush 19 | capget 20 | capset 21 | chdir 22 | chmod 23 | chown 24 | chown32 25 | chroot 26 | clock_getres 27 | clock_gettime 28 | clock_nanosleep 29 | clone 30 | close 31 | connect 32 | copy_file_range 33 | creat 34 | dup 35 | dup2 36 | dup3 37 | epoll_create 38 | epoll_create1 39 | epoll_ctl 40 | epoll_pwait 41 | epoll_wait 42 | eventfd 43 | eventfd2 44 | execve 45 | execveat 46 | exit 47 | exit_group 48 | faccessat 49 | fadvise64 50 | fadvise64_64 51 | fallocate 52 | fanotify_mark 53 | fchdir 54 | fchmod 55 | fchmodat 56 | fchown 57 | fchown32 58 | fchownat 59 | fcntl 60 | fcntl64 61 | fdatasync 62 | fgetxattr 63 | flistxattr 64 | flock 65 | fork 66 | fremovexattr 67 | fsetxattr 68 | fstat 69 | fstat64 70 | fstatat64 71 | fstatfs 72 | fstatfs64 73 | fsync 74 | ftruncate 75 | ftruncate64 76 | futex 77 | futimesat 78 | get_robust_list 79 | get_thread_area 80 | getcpu 81 | getcwd 82 | getdents 83 | getdents64 84 | getegid 85 | getegid32 86 | geteuid 87 | geteuid32 88 | getgid 89 | getgid32 90 | getgroups 91 | getgroups32 92 | getitimer 93 | getpeername 94 | getpgid 95 | getpgrp 96 | getpid 97 | getppid 98 | getpriority 99 | getrandom 100 | getresgid 101 | getresgid32 102 | getresuid 103 | getresuid32 104 | getrlimit 105 | getrusage 106 | getsid 107 | getsockname 108 | getsockopt 109 | gettid 110 | gettimeofday 111 | getuid 112 | getuid32 113 | getxattr 114 | inotify_add_watch 115 | inotify_init 116 | inotify_init1 117 | inotify_rm_watch 118 | ioctl 1 FICLONE 119 | ioctl 1 FIOCLEX 120 | ioctl 1 FIONBIO 121 | ioctl 1 FIONREAD 122 | ioctl 1 RNDGETENTCNT 123 | ioctl 1 SIOCGIWMODE 124 | ioctl 1 TCGETS 125 | ioctl 1 TCSETS 126 | ioctl 1 TCSETSW 127 | ioctl 1 TIOCGPGRP 128 | ioctl 1 TIOCGWINSZ 129 | ioctl 1 TIOCSPGRP 130 | ioctl 1 TIOCSWINSZ 131 | ioctl 1 VT_GETSTATE 132 | ioprio_get 133 | ipc 134 | kill 135 | lchown 136 | lchown32 137 | lgetxattr 138 | link 139 | linkat 140 | listen 141 | listxattr 142 | llistxattr 143 | lremovexattr 144 | lseek 145 | lsetxattr 146 | lstat 147 | lstat64 148 | madvise 149 | membarrier 150 | memfd_create 151 | mincore 152 | mkdir 153 | mkdirat 154 | 155 | # We don't need to allow creation of char/block devices. 156 | mknod 1 S_IFREG 157 | mknod 1 S_IFIFO 158 | mknod 1 S_IFSOCK 159 | mknodat 1 S_IFREG 160 | mknodat 1 S_IFIFO 161 | mknodat 1 S_IFSOCK 162 | 163 | mlock 164 | mlock2 165 | mlockall 166 | mq_getsetattr 167 | mq_notify 168 | mq_open 169 | mq_timedreceive 170 | mq_timedsend 171 | mq_unlink 172 | mremap 173 | msgctl 174 | msgget 175 | msgrcv 176 | msgsnd 177 | msync 178 | munlock 179 | munlockall 180 | munmap 181 | nanosleep 182 | newfstatat 183 | nice 184 | oldfstat 185 | oldlstat 186 | oldolduname 187 | oldstat 188 | olduname 189 | open 190 | openat 191 | pause 192 | pipe 193 | pipe2 194 | pkey_alloc 195 | pkey_free 196 | poll 197 | ppoll 198 | prctl 199 | pread64 200 | preadv 201 | preadv2 202 | prlimit64 203 | pselect6 204 | pwrite64 205 | pwritev 206 | pwritev2 207 | quotactl 208 | read 209 | readahead 210 | readdir 211 | readlink 212 | readlinkat 213 | readv 214 | recv 215 | recvfrom 216 | recvmsg 217 | recvmmsg 218 | removexattr 219 | rename 220 | renameat 221 | renameat2 222 | restart_syscall 223 | rmdir 224 | rt_sigaction 225 | rt_sigpending 226 | rt_sigprocmask 227 | rt_sigqueueinfo 228 | rt_sigreturn 229 | rt_sigsuspend 230 | rt_sigtimedwait 231 | rt_tgsigqueueinfo 232 | s390_pci_mmio_read 233 | s390_pci_mmio_write 234 | s390_sthyi 235 | sched_get_priority_max 236 | sched_get_priority_min 237 | sched_getaffinity 238 | sched_getattr 239 | sched_getparam 240 | sched_getscheduler 241 | sched_rr_get_interval 242 | sched_setaffinity 243 | sched_setattr 244 | sched_setparam 245 | sched_setscheduler 246 | sched_yield 247 | seccomp 248 | select 249 | semctl 250 | semget 251 | semop 252 | semtimedop 253 | send 254 | sendfile 255 | sendfile64 256 | sendmmsg 257 | sendmsg 258 | sendto 259 | set_robust_list 260 | set_thread_area 261 | set_tid_address 262 | setfsgid 263 | setfsgid32 264 | setfsuid 265 | setfsuid32 266 | setgid 267 | setgid32 268 | setgroups 269 | setgroups32 270 | setitimer 271 | setns 272 | setpgid 273 | setpriority 274 | setregid 275 | setregid32 276 | setresgid 277 | setresgid32 278 | setresuid 279 | setresuid32 280 | setreuid 281 | setreuid32 282 | setrlimit 283 | setsid 284 | setsockopt 285 | setuid 286 | setuid32 287 | setxattr 288 | shmctl 289 | shmdt 290 | shmget 291 | shutdown 292 | sigaction 293 | sigaltstack 294 | signal 295 | signalfd 296 | signalfd4 297 | sigpending 298 | sigprocmask 299 | sigreturn 300 | sigsuspend 301 | socket 0 AF_INET 302 | socket 0 AF_INET6 303 | socket 0 AF_LOCAL 304 | socket 0 AF_NETLINK 305 | socket 0 AF_UNIX 306 | socket 0 AF_UNSPEC 307 | socketcall 308 | socketpair 309 | splice 310 | spu_create 311 | spu_run 312 | stat 313 | stat64 314 | statfs 315 | statfs64 316 | statx 317 | symlink 318 | symlinkat 319 | sync 320 | sync_file_range 321 | sync_file_range2 322 | syncfs 323 | sysinfo 324 | tee 325 | tgkill 326 | time 327 | timer_create 328 | timer_delete 329 | timer_getoverrun 330 | timer_gettime 331 | timer_settime 332 | timerfd_create 333 | timerfd_gettime 334 | timerfd_settime 335 | times 336 | tkill 337 | truncate 338 | truncate64 339 | ugetrlimit 340 | umask 341 | uname 342 | unlink 343 | unlinkat 344 | unshare 345 | utime 346 | utimensat 347 | utimes 348 | vfork 349 | wait4 350 | waitid 351 | waitpid 352 | write 353 | writev 354 | 355 | ## W^X. 356 | # Disallow creating writable and executable mappings. 357 | mmap 2 PROT_NONE 358 | mmap 2 PROT_READ 359 | mmap 2 PROT_WRITE 360 | mmap 2 PROT_EXEC 361 | mmap 2 PROT_READ|PROT_EXEC 362 | mmap 2 PROT_READ|PROT_WRITE 363 | mmap2 2 PROT_NONE 364 | mmap2 2 PROT_READ 365 | mmap2 2 PROT_WRITE 366 | mmap2 2 PROT_EXEC 367 | mmap2 2 PROT_READ|PROT_EXEC 368 | mmap2 2 PROT_READ|PROT_WRITE 369 | 370 | # Disallow transitioning mappings to executable. 371 | mprotect 2 PROT_NONE 372 | mprotect 2 PROT_READ 373 | mprotect 2 PROT_WRITE 374 | mprotect 2 PROT_READ|PROT_WRITE 375 | pkey_mprotect 2 PROT_NONE 376 | pkey_mprotect 2 PROT_READ 377 | pkey_mprotect 2 PROT_WRITE 378 | pkey_mprotect 2 PROT_READ|PROT_WRITE 379 | 380 | # Disallow mapping shared memory segments as executable. 381 | shmat 2 0 382 | shmat 2 SHM_RND 383 | shmat 2 SHM_RDONLY 384 | shmat 2 SHM_REMAP 385 | -------------------------------------------------------------------------------- /usr/share/sandbox-app-launcher/seccomp-whitelist-wx: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 2 | ## See the file COPYING for copying conditions. 3 | 4 | @include /usr/share/sandbox-app-launcher/seccomp-whitelist 5 | 6 | ## Disable W^X. 7 | mmap 8 | mmap2 9 | mprotect 10 | pkey_mprotect 11 | shmat 12 | -------------------------------------------------------------------------------- /usr/share/sandbox-app-launcher/wrapper-script: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC 4 | ## See the file COPYING for copying conditions. 5 | 6 | if [ "$sandbox_app_launcher_debug" = "true" ]; then 7 | set -x 8 | fi 9 | 10 | ## TODO: update 11 | xsession_d_file_list_executable=( 12 | "/etc/X11/Xsession.d/20torbrowser" 13 | "/etc/X11/Xsession.d/20uwt" 14 | "/etc/X11/Xsession.d/20whonix" 15 | "/etc/X11/Xsession.d/20whonix-welcome-page" 16 | "/etc/X11/Xsession.d/20software_rendering_in_vms" 17 | "/etc/X11/Xsession.d/40open_link_confirmation" 18 | "/etc/X11/Xsession.d/40open_link_confirmation_kde" 19 | "/etc/X11/Xsession.d/50anon-apps-config" 20 | "/etc/X11/Xsession.d/50default_editor" 21 | "/etc/X11/Xsession.d/50tb_default_browser" 22 | "/etc/X11/Xsession.d/50torbrowser_default_browser" 23 | "/etc/X11/Xsession.d/50security-misc" 24 | ) 25 | 26 | xsession_d_file_list_existing=( 27 | "/etc/X11/Xsession.d/20qt-gnome-desktop-session-id" 28 | "/etc/X11/Xsession.d/20qt-x11-no-mitshm" 29 | "/etc/X11/Xsession.d/25xdg-qubes-settings" 30 | ) 31 | 32 | for file_name in "${xsession_d_file_list_executable[@]}" ; do 33 | if [ -x "$file_name" ]; then 34 | source "$file_name" 35 | fi 36 | done 37 | 38 | for file_name in "${xsession_d_file_list_existing[@]}" ; do 39 | if [ -e "$file_name" ]; then 40 | source "$file_name" 41 | fi 42 | done 43 | 44 | dbus-launch >/dev/null 45 | 46 | "${app_path}" "${@}" 47 | --------------------------------------------------------------------------------