Bug 207976 - rhnpush --force gives an ISE with --nullorg option as superuser
rhnpush --force gives an ISE with --nullorg option as superuser
Status: CLOSED CURRENTRELEASE
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Backend (Show other bugs)
rhn420
All Linux
medium Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
Corey Welton
:
Depends On:
Blocks: 166615
  Show dependency treegraph
 
Reported: 2006-09-25 12:46 EDT by Pradeep Kilambi
Modified: 2007-04-18 13:50 EDT (History)
1 user (show)

See Also:
Fixed In Version: rhn500h
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-19 21:13:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pradeep Kilambi 2006-09-25 12:46:49 EDT
Description of problem:

Basically, rhnpush does'nt allow users to use --force on nullorg
channels, in other words as superusers. The problem for getting a 500
error was that  the client was not passing the force as true in some
initial call. This skipped the check on server and later throws a ISE
500 error as we saw in the push. ex:

[root@prad rpms]# rhnpush --server=scripts.back-webdev.redhat.com
--username=rhn-noc --password=xxx swig-1.3.21-6.i386.rpm --force
--nullorg -vvv --channel=test-push
Connecting to http://scripts.back-webdev.redhat.com/APP
url is http://scripts.back-webdev.redhat.com/PACKAGE-PUSH
Result codes: 200 OK
Computing md5sum and package Info .This may take sometime ...

Uploading package swig-1.3.21-6.i386.rpm
Using POST request
Internal server error 500 Internal Server Error

Waiting 1 seconds and trying again...
Uploading package swig-1.3.21-6.i386.rpm
Using POST request
Internal server error 500 Internal Server Error

Waiting 3 seconds and trying again...
Uploading package swig-1.3.21-6.i386.rpm
Using POST request
Internal server error 500 Internal Server Error

Waiting 4 seconds and trying again...
Giving up after 3 attempts 

Version-Release number of selected component (if applicable):


How reproducible:

always

Steps to Reproduce:
1. push pkg with --force and --nullorg as a rhnsuperuser
2. should get an ISE 500 error

  
Actual results:

ISE 500 error. 

Expected results:

[root@prad rpms]# rhnpush --server=scripts.back-webdev.redhat.com
--username=rhn -noc --password=redhat swig-1.3.21-6.i386.rpm --force
--nullorg -vvv --channel=t est-push
Connecting to http://scripts.back-webdev.redhat.com/APP
url is http://scripts.back-webdev.redhat.com/PACKAGE-PUSH
Result codes: 200 OK
Computing md5sum and package Info .This may take sometime ...

Error Message:
    Cannot force push
Error Class Code: 4
Error Class Info: Permission denied.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.
Comment 1 Pradeep Kilambi 2006-09-25 12:54:31 EDT
the fix for this is we are not passing in force as true even though we have
--force specified. On the server in the authenticate_session call will check 

if null_org:
    if force:
       raises the rhnfault that " cannot force push"

as we do not allow su to force push i.e nullorg channels.

with the fix we should see something like this:

[root@prad rpms]# rhnpush --server=scripts.back-webdev.redhat.com
--username=rhn -noc --password=xxx swig-1.3.21-6.i386.rpm --force
--nullorg -vvv --channel=test-push
Connecting to http://scripts.back-webdev.redhat.com/APP
url is http://scripts.back-webdev.redhat.com/PACKAGE-PUSH
Result codes: 200 OK
Computing md5sum and package Info .This may take sometime ...

Error Message:
    Cannot force push
Error Class Code: 4
Error Class Info: Permission denied.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.
Comment 2 Corey Welton 2007-01-24 11:59:13 EST
QA Verified -- user is given perm denied (expected behaviour) and does not get a
500 ISE
Comment 3 Corey Welton 2007-03-08 10:51:53 EST
Prad has confirmed this fix has made its way into stage, also.
Comment 4 Brandon Perkins 2007-03-13 10:18:56 EDT
Closed in rhn500h Release.
Comment 5 Brandon Perkins 2007-03-13 13:55:21 EDT
Closed in rhn500h release.
Comment 6 Brandon Perkins 2007-03-13 16:38:40 EDT
Closed in rhn500h Release.
Comment 7 Brandon Perkins 2007-03-13 16:55:30 EDT
Closed in rhn500h Release.

Note You need to log in before you can comment on or make changes to this bug.