2008/1/7, Lucas C. Villa Real <[EMAIL PROTECTED]>:
> On Jan 6, 2008 10:45 PM, Carlo Calica <[EMAIL PROTECTED]> wrote:
> > On 1/6/08, Jonas Karlsson <[EMAIL PROTECTED]> wrote:
> > >
> > > A warning should be issued if adding the user/group fails.
I'd still want a warning if any action fails, as it could be critical
for the operation of the application that a group or user exist. Maybe
grep group/passwd for the group/user to erify that it was really
added?

[...]
>
> I've added these extra boundaries checks, improved
> get_next_system_id() and added some comments to make our policies
> clear. Does it look good enough for commit?
>
What does the code below do?
+      for num in `cat "$1" | cut -d: -f3 | sort -n`
+      do
+         [ $num -ge 100 -a $num -lt 999 ] && next=$num
+      done
+      if [ "$next" ]
+      then
+         let next=next+1
+         echo "$next"
+         return
+      fi

it feels as if it only loops existing gids/uids and returns the last,
but not looking for a available slot. Then if a gid/uid is found that
(+1) is returned, which means that the code below that, that tries to
find next available slot, is never reached.

-- 
/Jonas
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to