diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2021-05-07 06:50:12 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2021-05-07 06:50:12 -0400 |
commit | 213f5a7cfd16fed6b064afee4ed44ae2b33cd626 (patch) | |
tree | 410c2ac94bb70c1cc78e6e0c64dc2845bc705727 | |
parent | 23c45db76a8520fd6c3b1d9164dbe312f1ab1481 (diff) | |
download | cups-213f5a7cfd16fed6b064afee4ed44ae2b33cd626.tar.gz |
Pass CONTENT_TYPE and FINAL_CONTENT_TYPE env vars to XPC service.
-rw-r--r-- | backend/ipp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/ipp.c b/backend/ipp.c index 020ab7fd4..3779c88fa 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -3245,7 +3245,8 @@ run_as_user(char *argv[], /* I - Command-line arguments */ const char *device_uri, /* I - Device URI */ int fd) /* I - File to print */ { - const char *auth_negotiate;/* AUTH_NEGOTIATE env var */ + const char *auth_negotiate,/* AUTH_NEGOTIATE env var */ + *content_type; /* [FINAL_]CONTENT_TYPE env vars */ xpc_connection_t conn; /* Connection to XPC service */ xpc_object_t request; /* Request message dictionary */ __block xpc_object_t response; /* Response message dictionary */ @@ -3308,6 +3309,10 @@ run_as_user(char *argv[], /* I - Command-line arguments */ getenv("AUTH_INFO_REQUIRED")); if ((auth_negotiate = getenv("AUTH_NEGOTIATE")) != NULL) xpc_dictionary_set_string(request, "auth-negotiate", auth_negotiate); + if ((content_type = getenv("CONTENT_TYPE")) != NULL) + xpc_dictionary_set_string(request, "content-type", content_type); + if ((content_type = getenv("FINAL_CONTENT_TYPE")) != NULL) + xpc_dictionary_set_string(request, "final-content-type", content_type); xpc_dictionary_set_fd(request, "stdin", fd); xpc_dictionary_set_fd(request, "stderr", 2); xpc_dictionary_set_fd(request, "side-channel", CUPS_SC_FD); |