True, it's implementation defined. But almost all implementations choose one of the two options. There is a reason for this.
FYI. I introduced a (bad) security bug into Samba a long time ago by expecting the wrong return (i.e. the one the implementations never return :-).