Here is the code:
(root:)
# mkdir /test
# cp /bin/bash /test/sbash
# chmod a+s /test/sbash
(user1:)
$ cd /test
$ ./sbash
$ mkdir trycreate
mkdir: cannot create directory `trycreate': Permission denied
And bash scripts with setuid bit set not work, either.
By the way, my setuid perl script works:
test.pl: (with setuid bit set, owner=root)
#!/usr/bin/perl
mkdir('/test/tryperlcreate') or die 'failed';
execute test.pl by user1 will create the directory owned by root.