Index: es_title.c =================================================================== RCS file: /home/products/cvstree/sw_c/common/os/es/es_title.c,v retrieving revision 1.142.10.8 retrieving revision 1.142.10.9 diff -r1.142.10.8 -r1.142.10.9 3462a3463 > esPrint(ES_DEBUG_INFO, "%s: uid=%08x caller=%08x\n", __FUNCTION__, uid, callerId); 3466c3467 < esPrint(ES_DEBUG_INFO, "owner=%08x caller=%08x\n", owner, callerId); --- > esPrint(ES_DEBUG_INFO, "%s: handle=%d owner=%08x caller=%08x\n", __FUNCTION__, keyHandle, owner, callerId); 3519c3520 < esSetupStreamKey(const ESTicketView* ticketView, const ESTitleMeta* tmd, u32 tmdSize, IOSCSecretKeyHandle* hStreamKey) --- > esSetupStreamKey(IOSUid callerId, const ESTicketView* ticketView, const ESTitleMeta* tmd, u32 tmdSize, IOSCSecretKeyHandle* hStreamKey) 3530a3532 > u32 titleType = 0; 3539,3541c3541,3546 < /* check title type */ < if ((ntohl(tmd->head.type) & ES_TITLE_TYPE_STREAM) != ES_TITLE_TYPE_STREAM) { < esPrint(ES_DEBUG_ERROR, "title not stream type\n"); --- > titleType = ntohl(tmd->head.type); > > /* check title types */ > if (((titleType & ES_TITLE_TYPE_STREAM) != ES_TITLE_TYPE_STREAM) > && ((titleType & ES_TITLE_TYPE_WFS) != ES_TITLE_TYPE_WFS)) { > esPrint(ES_DEBUG_ERROR, "title not stream or wfs type\n"); 3546,3549c3551,3579 < /* check access rights */ < if (!__checkAccessRights((ESTicketView*)ticketView)) { < esPrint(ES_DEBUG_ERROR, "access rights denied\n"); < rv = ES_ERR_NO_RIGHT; --- > /* does not support both STREAM and WFS type at the same time */ > if ((titleType & (ES_TITLE_TYPE_STREAM|ES_TITLE_TYPE_WFS)) == > (ES_TITLE_TYPE_STREAM|ES_TITLE_TYPE_WFS)) { > esPrint(ES_DEBUG_ERROR, "incorrect usage of stream and wfs type\n"); > rv = ES_ERR_INVALID; > goto out; > } > > /* only WFS process can use this API from IOP */ > if (callerId < ES_SYS_APP_UID && callerId != IOS_WFS_PROCESS) { > esPrint(ES_DEBUG_ERROR, "invalid caller id %d on IOP\n", callerId); > rv = ES_ERR_INVALID; > goto out; > } > > /* only WFS process can use WFS title type */ > if (((titleType & ES_TITLE_TYPE_WFS) == ES_TITLE_TYPE_WFS) > && (callerId != IOS_WFS_PROCESS)) { > esPrint(ES_DEBUG_ERROR, "invalid caller id %d for wfs type\n", > callerId); > rv = ES_ERR_INVALID; > goto out; > } > > /* verify titleId between TMD and eTicket */ > if (ticketView->titleId != ntohll(tmd->head.titleId)) { > esPrint(ES_DEBUG_ERROR, "Mismatching title ID %llx %llx\n", > ticketView->titleId, ntohll(pTmd->head.titleId)); > rv = ES_ERR_INVALID; 3552a3583,3602 > /* check access rights */ > esPrint(ES_DEBUG_WARN, "launch ctx: valid=%d pTicket=0x%08x pTmd=0x%08x\n", > __launchCtx.valid, __launchCtx.pTicket, __launchCtx.pTmd); > > if (callerId != IOS_WFS_PROCESS) { /* request from PPC */ > if (!__checkAccessRights((ESTicketView*)ticketView)) { > esPrint(ES_DEBUG_ERROR, "access rights denied (PPC)\n"); > rv = ES_ERR_NO_RIGHT; > goto out; > } > } > else { /* request from WFS */ > if (((IOS_WFS_PROCESS & ~(ticketView->accessTitleMask)) > != (ticketView->accessTitleId)) ) { > esPrint(ES_DEBUG_ERROR, "access rights denied (IOP)\n"); > rv = ES_ERR_NO_RIGHT; > goto out; > } > } > 3611c3661,3666 < rv = IOSC_SetOwnership(*hStreamKey, 0x1 << IOS_PPCBOOT_PROCESS); --- > > if (callerId >= ES_SYS_APP_UID) { > callerId = IOS_PPCBOOT_PROCESS; > } > esPrint(ES_DEBUG_INFO, "%s: setting ownership to uid %d\n", __FUNCTION__, callerId); > rv = IOSC_SetOwnership(*hStreamKey, 0x1 << callerId);