{"id":20167377,"url":"https://github.com/throwaway96/glycerine","last_synced_at":"2026-05-28T23:31:07.327Z","repository":{"id":231972592,"uuid":"783143581","full_name":"throwaway96/glycerine","owner":"throwaway96","description":"Whitelist all logs on webOS 1","archived":false,"fork":false,"pushed_at":"2024-04-07T04:01:56.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-03T12:20:22.348Z","etag":null,"topics":["lg","logging","tv","webos"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/throwaway96.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-07T03:50:32.000Z","updated_at":"2024-04-07T03:58:21.000Z","dependencies_parsed_at":"2024-04-07T05:19:47.827Z","dependency_job_id":"09c39c89-8103-4daf-84af-315fb263dbfa","html_url":"https://github.com/throwaway96/glycerine","commit_stats":null,"previous_names":["throwaway96/glycerine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/throwaway96/glycerine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throwaway96%2Fglycerine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throwaway96%2Fglycerine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throwaway96%2Fglycerine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throwaway96%2Fglycerine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/throwaway96","download_url":"https://codeload.github.com/throwaway96/glycerine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throwaway96%2Fglycerine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33630999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lg","logging","tv","webos"],"created_at":"2024-11-14T00:51:22.383Z","updated_at":"2026-05-28T23:31:07.307Z","avatar_url":"https://github.com/throwaway96.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glycerine\n\nOn webOS 1, there doesn't seem to be any way to enable\n[\"dev logs\"](https://www.webosbrew.org/pages/logging.html)—i.e., disable the\nwhitelist in `PmLogDaemon`. Instead, let's just add everything to the\nwhitelist... or at least make `PmLogDaemon` *believe* everything is\nwhitelisted.\n\n## Theory\n\nMy first attempt was to just always return something non-null from\n`g_hash_table_lookup()`, since the only time it's used in `PmLogDaemon` is for\nchecking the whitelist. However, it's unfortunately also used by some\ndependencies (in particular, `libpbnjson`), so it needs to actually work.\n\nI thought about checking which module `g_hash_table_lookup()` was being called\nfrom, but I'm too lazy for that. Instead, I decided to just grab the first hash\ntable created with `g_hash_table_new()` that uses the default string hash table\nfunctions `g_str_hash` and `g_str_equal`. The creation of the whitelist hash\ntable occurs early in the lifetime of `PmLogDaemon`—it may well be the very\nfirst one, but the extra checks don't hurt. Anyway, when\n`g_hash_table_lookup()` is called on the previously recorded hash table, I just\nreturn a non-null value. It's not a valid pointer, but `PmLogDaemon` only cares\nwhether it's null and does not dereference it. If the wrong table is somehow\nchosen, the program will almost certainly crash.\n\n## Building\n\nUse [buildroot-nc4](https://github.com/openlgtv/buildroot-nc4).\n\nFor example, if it's located in `/opt/arm-webos-linux-gnueabi_sdk-buildroot/`,\nrun:\n\n```sh\nmake CROSS_COMPILE=/opt/arm-webos-linux-gnueabi_sdk-buildroot/bin/arm-webos-linux-gnueabi-\n```\n\n## Using\n\nIf you kill `PmLogDaemon` a bunch of times quickly, Upstart will stop trying to\nrestart it. Then you can start it yourself with:\n\n```sh\nLD_PRELOAD=/path/to/libglycerine.so /usr/sbin/PmLogDaemon -z -f 6 -m\n```\n\nThe arguments are from `/etc/init/PmLogDaemon.conf`.\n\nAlthough `PmLogDaemon --help` mentions `-v`/`--verbose`, it doesn't seem to do\nanything (at least on stdout/stderr).\n\n## Debugging\n\nTo debug using `gdb`:\n\n```sh\ngdb --args /usr/sbin/PmLogDaemon -z -f 6 -m\nset exec-wrapper env LD_PRELOAD=/path/to/libglycerine.so\nrun\n```\n\n## License\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Affero General Public License as published by the Free\nSoftware Foundation, either version 3 of the License, or (at your option) any\nlater version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along\nwith this program. If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\nSee `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthrowaway96%2Fglycerine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthrowaway96%2Fglycerine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthrowaway96%2Fglycerine/lists"}