- NEED_ROOT (return NULL);
- ABS_PATH (path, return NULL);
+ if (strlen (encoding) != 1 ||
+ strchr ("sSblBL", encoding[0]) == NULL) {
+ reply_with_error ("%s: invalid encoding", encoding);
+ return NULL;
+ }
+
+ CHROOT_IN;
+ fd = open (path, O_RDONLY);
+ CHROOT_OUT;