Re: [PATCH 1/1] Char: moxa, prevent opening unavailable ports

From: Alan Cox
Date: Tue Jun 09 2009 - 19:34:04 EST


> btw, what's this code in moxa_open() doing?
>
> if (port == MAX_PORTS) {
> return capable(CAP_SYS_ADMIN) ? 0 : -EPERM;
> }
>
> why does it return 0 if CAP_SYS_ADMIN?

0-MAX_PORTS-1 = tty devices
MAX_PORTS = magic secret control channel

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/