Tom is caught shoplifting at the local Walmart store in Annapolis, MD. He is being held by store security until a police officer arrives. The officer initially intended to issue a summons to Tom and release him thereafter. However, as required by departmental policy, the officer checked Tom for any outstanding warrants prior to his release. Sure enough, Tom was wanted a felony arrest warrant for burglary in Baltimore, MD. Tom is arrested on the warrant. The arresting officer then searched Tom. Tom was told to empty out all of his pockets, which included several personal items and his wallet. Tom also had a backpack with him which the security officer had retained. The police officer opened the backpack and unzipped every compartment and removed every item. This included opening two small containers and an additional zippered pouch. The officer found cocaine in both small containers. The officer charged Tom with illegal possession of narcotics.
Was the search of Tom and his backpack constitutional? Why or why not?