diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 01:35:06 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 02:11:48 +0200 |
commit | 1a64deeb894dc95e2645a75771732c6cc53a79ad (patch) | |
tree | 1b9df4838f894577a09b9b260151756272efeb53 /flakes/mypackages/overlays/ympd/ympd-password-env.patch | |
parent | fa25ffd4583cc362075cd5e1b4130f33306103f0 (diff) | |
download | Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip |
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them
contained personnal information about users. All thos changes got
stashed into a single commit (history is kept in a different place) and
private information was moved in a separate private repository
Diffstat (limited to 'flakes/mypackages/overlays/ympd/ympd-password-env.patch')
-rw-r--r-- | flakes/mypackages/overlays/ympd/ympd-password-env.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/flakes/mypackages/overlays/ympd/ympd-password-env.patch b/flakes/mypackages/overlays/ympd/ympd-password-env.patch new file mode 100644 index 0000000..2bbe188 --- /dev/null +++ b/flakes/mypackages/overlays/ympd/ympd-password-env.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | diff --git a/src/ympd.c b/src/ympd.c | ||
2 | index 3aed7e6..b3b6fda 100644 | ||
3 | --- a/src/ympd.c | ||
4 | +++ b/src/ympd.c | ||
5 | @@ -71,6 +71,7 @@ int main(int argc, char **argv) | ||
6 | char *run_as_user = NULL; | ||
7 | char const *error_msg = NULL; | ||
8 | char *webport = "8080"; | ||
9 | + const char *s; | ||
10 | |||
11 | atexit(bye); | ||
12 | #ifdef WITH_DYNAMIC_ASSETS | ||
13 | @@ -92,6 +93,10 @@ int main(int argc, char **argv) | ||
14 | {0, 0, 0, 0 } | ||
15 | }; | ||
16 | |||
17 | + if ((s = getenv("MPD_PASSWORD")) != NULL) { | ||
18 | + mpd.password = strdup(s); | ||
19 | + } | ||
20 | + | ||
21 | while((n = getopt_long(argc, argv, "h:p:w:u:vm:", | ||
22 | long_options, &option_index)) != -1) { | ||
23 | switch (n) { | ||