Exhibit 10.29 EXECUTION COPY SECOND AMENDMENT TO THE AMENDED AND RESTATED SECURITY AGREEMENT Dated as of May 7, 2004 SECOND AMENDMENT TO THE AMENDED AND RESTATED SECURITY AGREEMENT (the "AMENDMENT") among BUILDING MATERIALS CORPORATION OF AMERICA, a Delaware corporation (the "COMPANY"), each other grantor party to the Security Agreement referred to below (the "GRANTORS"), the undersigned banks, financial institutions and other institutional lenders party hereto (collectively, the "LENDERS" and each a "LENDER"), and CITIBANK, N.A., a national banking association, as collateral agent under the Security Agreement referred to below (the "COLLATERAL AGENT"). PRELIMINARY STATEMENTS: (1) Reference is made to the Credit Agreement, dated as of July 9, 2003 (as amended, supplemented or otherwise modified through the date hereof, the "CREDIT AGREEMENT"), among the Company, the lenders from time to time party thereto, Citicorp USA, Inc., as administrative agent (the "ADMINISTRATIVE AGENT"), and Citigroup Global Markets Inc., as lead arranger. (2) Reference is also made to the Amended and Restated Security Agreement, dated as of July 9, 2003 (as amended by the First Amendment to the Amended and Restated Security Agreement, dated as of August 22, 2003, and as otherwise amended, supplemented or otherwise modified through the date hereof, the "SECURITY AGREEMENT"), among the Company, the Grantors and the Collateral Agent. (3) Capitalized terms not otherwise defined in this Amendment have the same meanings as specified in the Security Agreement or the Credit Agreement, as applicable. (4) The parties hereto have agreed to amend the Security Agreement as hereinafter set forth. SECTION 1. AMENDMENTS TO THE SECURITY AGREEMENT. (a) Section 1.1 of the Security Agreement is amended by replacing, in the defined term "System Cash" therein, the words "calculated by the Borrower to be reasonably sufficient to fund the next payroll and related benefit costs and remit withholding and other payroll taxes and related costs of the Borrower and its Subsidiaries," with the phrase "permitted under Section 3.4(d)(iii),". (b) Section 3.4(d)(iii) of the Security Agreement is amended by (i) deleting the phrase "$275,000 for each such Payroll Account or" in the tenth line thereof and (ii) replacing the figure "$2,500,000" contained therein with the figure "$6,500,000". 2 SECTION 2. CONDITIONS OF EFFECTIVENESS. This Amendment is subject to the provisions of Section 14 of the Security Agreement and Section 8.01 of the Credit Agreement. This Amendment shall become effective as of the date first above written when, and only when, the Administrative Agent shall have received counterparts of this Amendment executed by the Company and the Collateral Agent. SECTION 3. REFERENCE TO AND EFFECT ON THE LOAN DOCUMENTS.(a) On and after the effectiveness of this Amendment, each reference in the Security Agreement to "this Agreement", "hereunder", "hereof" or words of like import referring to the Security Agreement, and each reference in each of the other Loan Documents to "the Security Agreement", "thereunder", "thereof" or words of like import referring to the Security Agreement, shall mean and be a reference to the Security Agreement, as amended by this Amendment. (b) The Security Agreement, as specifically amended by this Amendment, is and shall continue to be in full force and effect and is hereby in all respects ratified and confirmed. (c) The execution, delivery and effectiveness of this Amendment shall not, except as expressly provided herein, operate as a waiver of any right, power or remedy of any Lender, the Administrative Agent or the Collateral Agent under any of the Loan Documents, nor constitute a waiver of any provision of any of the Loan Documents. SECTION 4. COSTS AND EXPENSES.The Company agrees to pay on demand all costs and expenses of the Administrative Agent and the Collateral Agent in connection with the preparation, execution, delivery and administration, modification and amendment of this Amendment (including, without limitation, the reasonable fees and expenses of counsel for the Administrative Agent and the Collateral Agent) in accordance with the terms of Section 8.04 of the Credit Agreement and Section 10 of the Security Agreement. SECTION 5. EXECUTION IN COUNTERPARTS.This Amendment may be executed in any number of counterparts and by different parties hereto in separate counterparts, each of which when so executed shall be deemed to be an original and all of which taken together shall constitute but one and the same agreement. Delivery of an executed counterpart of a signature page to this Amendment by telecopier shall be effective as delivery of a manually executed counterpart of this Amendment. SECTION 6. GOVERNING LAW.This Amendment shall be governed by, and construed in accordance with, the laws of the State of New York. [REMAINDER OF THIS PAGE INTENTIONALLY LEFT BLANK] IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed by their respective officers thereunto duly authorized, as of the date first above written. BUILDING MATERIALS CORPORATION OF AMERICA By /s/ John M. Maitner ------------------------------------------ Name: John M. Maitner Title: Vice President and Treasurer BMCA INSULATION PRODUCTS INC. BUILDING MATERIALS INVESTMENT CORPORATION BUILDING MATERIALS MANUFACTURING CORPORATION DUCTWORK MANUFACTURING CORPORATION GAF LEATHERBACK CORP. GAF MATERIALS CORPORATION (CANADA) GAF PREMIUM PRODUCTS INC. GAF REAL PROPERTIES, INC. GAFTECH CORPORATION LL BUILDING PRODUCTS INC. PEQUANNOCK VALLEY CLAIM SERVICE COMPANY, INC. SOUTH PONCA REALTY CORP. WIND GAP REAL PROPERTY ACQUISITION CORP. BMCA QUAKERTOWN INC. By /s/ John M. Maitner ------------------------------------------ Name: John M. Maitner Title: Vice President and Treasurer CITIBANK, N.A., as Collateral Agent By /s/ Barbara E. Bennett ------------------------------------------ Name: Barbara E. Bennett Title: Assistant Vice President