This works:

$ touch a && settrans a /hurd/symlink b

This doesn't:

$ mkdir a && settrans a /hurd/symlink b
settrans: a: Is a directory

It's the same file_set_translator RPC both times, and it's translator short-circuiting which makes the latter one fail:


  /* Set passive translator */
  if (passive_flags & FS_TRANS_SET)
      if (!(passive_flags & FS_TRANS_FORCE))
          /* Handle the short-circuited translators */
          mode_t newmode = 0;

          if (diskfs_shortcut_symlink && !strcmp (passive, _HURD_SYMLINK))
            newmode = S_IFLNK;

          if (newmode)
              if (S_ISDIR (np->dn_stat.st_mode))
                  /* We can't allow this, because if the mode of the directory
                     changes, the links will be lost.  Perhaps it might be
                     allowed for empty directories, but that's too much of a
                     pain.  */
                  mutex_unlock (&np->lock);
                  return EISDIR;